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

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

Best Java code snippets using com.mikepenz.fastadapter.FastAdapter.with (Showing top 19 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

/**
 * creates a new FastAdapter with the provided adapters
 * if adapters is null, a default ItemAdapter is defined
 *
 * @param adapters the adapters which this FastAdapter should use
 * @return a new FastAdapter
 */
public static <Item extends IItem, A extends IAdapter> FastAdapter<Item> with(@Nullable Collection<A> adapters) {
  return with(adapters, null);
}
origin: mikepenz/MaterialDrawer

mAdapter = FastAdapter.with(mItemAdapter);
mAdapter.withSelectable(true);
mAdapter.withAllowDeselection(false);
origin: mikepenz/FastAdapter

mFastAdapter = FastAdapter.with(Arrays.asList(headerAdapter, itemAdapter));
origin: mikepenz/FastAdapter

mFastAdapter = FastAdapter.with(Arrays.asList(mItemAdapter));
mFastAdapter.withSelectable(true);
mFastAdapter.withMultiSelect(true);
origin: mikepenz/FastAdapter

fastAdapter = FastAdapter.with(Arrays.asList(itemAdapter));
fastAdapter.withSelectable(true);
origin: mikepenz/FastAdapter

mFastAdapter = FastAdapter.with(Arrays.asList(mHeaderAdapter, mItemAdapter), Arrays.<IAdapterExtension<IItem>>asList(mExpandableExtension));
origin: mikepenz/FastAdapter

fastAdapter = FastAdapter.with(itemAdapter);
fastAdapter.withSelectable(true);
origin: mikepenz/ItemAnimators

mFastAdapter = FastAdapter.with(mItemAdapter);
mFastAdapter.withSelectable(true);
mFastAdapter.withMultiSelect(true);
origin: mikepenz/FastAdapter

fastAdapter = FastAdapter.with(Arrays.asList(itemAdapter));
fastAdapter.withSelectable(true);
origin: mikepenz/FastAdapter

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

private void initAdapterIfNeeded() {
  if (mFastAdapter == null || mRecyclerView.getAdapter() == null) {
    mItemAdapter = ItemAdapter.items();
    mFastAdapter = FastAdapter.with(mItemAdapter);
    mRecyclerView.setAdapter(mFastAdapter);
  }
}
origin: mikepenz/FastAdapter

fastAdapter = FastAdapter.with(Arrays.asList(headerAdapter, itemAdapter));
fastAdapter.withSelectable(true);
origin: mikepenz/FastAdapter

private void initAdapterIfNeeded() {
  if (mFastAdapter == null || mRecyclerView.getAdapter() == null) {
    mItemAdapter = ItemAdapter.items();
    mFastAdapter = FastAdapter.with(mItemAdapter);
    mRecyclerView.setAdapter(mFastAdapter);
  }
}
origin: mikepenz/FastAdapter

@Before
public void setUp() throws Exception {
  itemAdapter = new ItemAdapter<>();
  adapter = FastAdapter.with(itemAdapter);
}
origin: mikepenz/AboutLibraries

/**
 * builder to build an adapter out of the given information ;D
 *
 * @param context the current context
 * @return a LibsRecyclerViewAdapter with the libraries
 */
public FastAdapter adapter(Context context) {
  Libs libs;
  if (fields == null) {
    libs = new Libs(context);
  } else {
    libs = new Libs(context, fields);
  }
  //apply modifications
  libs.modifyLibraries(libraryModification);
  //fetch the libraries and sort if a comparator was set
  ArrayList<Library> libraries = libs.prepareLibraries(context, internalLibraries, excludeLibraries, autoDetect, checkCachedDetection, sort);
  //prepare adapter
  ItemAdapter itemAdapter = new ItemAdapter();
  List<LibraryItem> libraryItems = new ArrayList<>();
  for (Library library : libraries) {
    libraryItems.add(new LibraryItem().withLibrary(library).withLibsBuilder(this));
  }
  FastAdapter fastAdapter = FastAdapter.with(itemAdapter);
  //noinspection unchecked
  itemAdapter.add(libraryItems);
  return fastAdapter;
}
origin: mikepenz/FastAdapter

@Before
public void setUp() throws Exception {
  itemAdapter = new ItemAdapter<>();
  expandableExtension = new ExpandableExtension<>();
  adapter = FastAdapter.with(itemAdapter);
  adapter.addExtension(expandableExtension);
  //adapter.withPositionBasedStateManagement(true);
}
origin: mikepenz/FastAdapter

@Before
public void setUp() throws Exception {
  itemAdapter = new ItemAdapter<>();
  adapter = FastAdapter.with(itemAdapter);
  selectExtension = new SelectExtension<>();
  adapter.addExtension(selectExtension);
  //adapter.withPositionBasedStateManagement(true);
}
origin: mikepenz/AboutLibraries

mAdapter = FastAdapter.with(mItemAdapter);
mRecyclerView.setAdapter(mAdapter);
com.mikepenz.fastadapterFastAdapterwith

Javadoc

creates a new FastAdapter with the provided adapters if adapters is null, a default ItemAdapter is defined

Popular methods of FastAdapter

  • 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
  • withSelectable
    Set to true if you want the items to be selectable. By default, no items are selectable
  • 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

  • Reading from database using SQL prepared statement
  • putExtra (Intent)
  • getResourceAsStream (ClassLoader)
  • runOnUiThread (Activity)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Path (java.nio.file)
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JButton (javax.swing)
  • Github Copilot alternatives
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