Tabnine Logo
FastAdapter.withSelectable
Code IndexAdd Tabnine to your IDE (free)

How to use
withSelectable
method
in
com.mikepenz.fastadapter.FastAdapter

Best Java code snippets using com.mikepenz.fastadapter.FastAdapter.withSelectable (Showing top 15 results out of 315)

origin: mikepenz/MaterialDrawer

/**
 * get the adapter (null safe)
 *
 * @return the FastAdapter used with this drawer
 */
protected FastAdapter<IDrawerItem> getAdapter() {
  if (mAdapter == null) {
    mAdapter = FastAdapter.with(Arrays.asList(mHeaderAdapter, mItemAdapter, mFooterAdapter), Arrays.<IAdapterExtension<IDrawerItem>>asList(mExpandableExtension));
    mAdapter.withSelectable(true);
    mAdapter.withMultiSelect(false);
    mAdapter.withAllowDeselection(false);
    mAdapter.setHasStableIds(mHasStableIds);
  }
  return mAdapter;
}
origin: mikepenz/FastAdapter

@Test
public void withSelectable() throws Exception {
  assertThat(adapter.withSelectable(false).isSelectable()).isFalse();
  assertThat(adapter.withSelectable(true).isSelectable()).isTrue();
}
origin: mikepenz/FastAdapter

@Test
public void withSelectable() throws Exception {
  assertThat(adapter.withSelectable(true).isSelectable()).isTrue();
  assertThat(adapter.withSelectable(false).isSelectable()).isFalse();
}
origin: mikepenz/FastAdapter

@Test
public void select() throws Exception {
  adapter.withSelectable(true);
  itemAdapter.set(TestDataGenerator.genTestItemList(100));
  assertThat(adapter.getSelectedItems().size()).isEqualTo(0);
  assertThat(adapter.getSelections().size()).isEqualTo(0);
  adapter.select(10);
  assertThat(adapter.getSelectedItems().size()).isEqualTo(1);
  assertThat(adapter.getSelectedItems().iterator().next().getIdentifier()).isEqualTo(10);
  assertThat(adapter.getSelections().size()).isEqualTo(1);
  assertThat(adapter.getSelections().iterator().next()).isEqualTo(10);
}
origin: mikepenz/MaterialDrawer

mAdapter.withSelectable(true);
mAdapter.withAllowDeselection(false);
mRecyclerView.setAdapter(mAdapter);
origin: mikepenz/FastAdapter

fastAdapter.withSelectable(true);
origin: mikepenz/FastAdapter

itemAdapter = new ItemAdapter<>(itemListImpl);
fastAdapter = FastAdapter.with(itemAdapter);
fastAdapter.withSelectable(true);
origin: mikepenz/FastAdapter

fastAdapter.withSelectable(true);
origin: mikepenz/FastAdapter

fastAdapter.withSelectable(true);
origin: mikepenz/FastAdapter

mFastAdapter.withSelectable(true);
mFastAdapter.withMultiSelect(true);
mFastAdapter.withSelectOnLongClick(true);
origin: mikepenz/FastAdapter

fastAdapter.withSelectable(true);
origin: mikepenz/FastAdapter

mFastAdapter.withSelectable(true);
mFastAdapter.withMultiSelect(true);
mFastAdapter.withSelectOnLongClick(true);
origin: mikepenz/FastAdapter

.withSelectable(true)
.withMultiSelect(true)
.withSelectOnLongClick(true)
origin: mikepenz/FastAdapter

mFastAdapter.withSelectable(true);
mFastAdapter.withMultiSelect(true);
mFastAdapter.withSelectOnLongClick(false);
origin: mikepenz/ItemAnimators

mFastAdapter.withSelectable(true);
mFastAdapter.withMultiSelect(true);
mFastAdapter.withSelectOnLongClick(false);
com.mikepenz.fastadapterFastAdapterwithSelectable

Javadoc

Set to true if you want the items to be selectable. By default, no items are selectable

Popular methods of FastAdapter

  • with
    creates a new FastAdapter with the provided adapters if adapters is null, a default ItemAdapter is d
  • getItem
    gets the IItem by a position, from all registered adapters
  • getItemCount
    calculates the total ItemCount over all registered adapters
  • getExtension
  • getAdapter
    Gets the adapter for the given position
  • getPosition
    Searches for the given item and calculates its global position
  • getSelections
  • addExtension
  • getPreItemCountByOrder
    calculates the item count up to a given (excluding this) order number
  • getRelativeInfo
    Internal method to get the Item as ItemHolder which comes with the relative position within its adap
  • notifyItemChanged
  • saveInstanceState
    add the values to the bundle for saveInstanceState
  • notifyItemChanged,
  • saveInstanceState,
  • select,
  • withSavedInstanceState,
  • addAdapter,
  • getItemId,
  • getItemViewType,
  • getPreItemCount,
  • getSelectedItems

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • String (java.lang)
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now