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

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

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

origin: mikepenz/MaterialDrawer

/**
 * Define a custom Adapter which will be used in the drawer
 * NOTE: this is not recommender
 * WARNING: if you do this after adding items you will loose those!
 *
 * @param adapter the FastAdapter to use with this drawer
 * @return this
 */
public DrawerBuilder withAdapter(@NonNull FastAdapter<IDrawerItem> adapter) {
  this.mAdapter = adapter;
  //we have to rewrap as a different FastAdapter was provided
  adapter.addAdapter(0, mHeaderAdapter);
  adapter.addAdapter(1, mItemAdapter);
  adapter.addAdapter(2, mFooterAdapter);
  adapter.addExtension(mExpandableExtension);
  return this;
}
origin: mikepenz/FastAdapter

/**
 * creates a new FastAdapter with the provided adapters
 * if adapters is null, a default ItemAdapter is defined
 *
 * @param adapter the adapters which this FastAdapter should use
 * @return a new FastAdapter
 */
@SuppressWarnings("unchecked")
public static <Item extends IItem, A extends IAdapter> FastAdapter<Item> with(A adapter) {
  FastAdapter<Item> fastAdapter = new FastAdapter<>();
  fastAdapter.addAdapter(0, adapter);
  return fastAdapter;
}
origin: mikepenz/FastAdapter

  @Test
  public void testAddPreviouslyFilledAdapterPropagatesPossibleTypesToParentFastAdapter() {
    final TestItem testItem = new TestItem("example name");
    ItemAdapter<TestItem> itemAdapter = new ItemAdapter<>();
    itemAdapter.add(testItem);
    FastAdapter<TestItem> adapter = new FastAdapter<>();
    adapter.addAdapter(0, itemAdapter);
    final ViewGroup dummyParent = new FrameLayout(RuntimeEnvironment.application);
    adapter.onCreateViewHolder(dummyParent, testItem.getType());
  }
}
com.mikepenz.fastadapterFastAdapteraddAdapter

Javadoc

add's a new adapter at the specific position

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
  • 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
  • getRelativeInfo,
  • notifyItemChanged,
  • saveInstanceState,
  • select,
  • withSavedInstanceState,
  • getItemId,
  • getItemViewType,
  • getPreItemCount,
  • getSelectedItems

Popular in Java

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • setRequestProperty (URLConnection)
  • getExternalFilesDir (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Path (java.nio.file)
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Top Vim plugins
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