congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
FastAdapter.deselect
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: mikepenz/MaterialDrawer

/**
 * deselects all selected items
 */
public void deselect() {
  getAdapter().deselect();
}
origin: mikepenz/MaterialDrawer

/**
 * deselects the item with the given identifier
 *
 * @param identifier the identifier to search for
 */
public void deselect(long identifier) {
  getAdapter().deselect(getPosition(identifier));
}
origin: mikepenz/FastAdapter

  @Override
  public void onClick(View v, int position, FastAdapter<RadioButtonSampleItem> fastAdapter, RadioButtonSampleItem item) {
    if (!item.isSelected()) {
      Set<Integer> selections = fastAdapter.getSelections();
      if (!selections.isEmpty()) {
        int selectedPosition = selections.iterator().next();
        fastAdapter.deselect();
        fastAdapter.notifyItemChanged(selectedPosition);
      }
      fastAdapter.select(position);
    }
  }
}
origin: mikepenz/MaterialDrawer

/**
 * set the selection of the MiniDrawer
 *
 * @param identifier the identifier of the item which should be selected (-1 for none)
 */
public void setSelection(long identifier) {
  if (identifier == -1) {
    mAdapter.deselect();
  }
  int count = mAdapter.getItemCount();
  for (int i = 0; i < count; i++) {
    IDrawerItem item = mAdapter.getItem(i);
    if (item.getIdentifier() == identifier && !item.isSelected()) {
      mAdapter.deselect();
      mAdapter.select(i);
    }
  }
}
origin: mikepenz/MaterialDrawer

drawer.getAdapter().deselect();
origin: mikepenz/MaterialDrawer

  mSelectedItemPosition = 1;
mAdapter.deselect();
mAdapter.select(mSelectedItemPosition);
    mAdapter.deselect();
    mAdapter.withSavedInstanceState(mSavedInstance, Drawer.BUNDLE_SELECTION);
    DrawerUtils.setStickyFooterSelection(this, mSavedInstance.getInt(Drawer.BUNDLE_STICKY_FOOTER_SELECTION, -1), null);
  } else {
    mAdapter.deselect();
    mAdapter.withSavedInstanceState(mSavedInstance, Drawer.BUNDLE_SELECTION_APPENDED);
    DrawerUtils.setStickyFooterSelection(this, mSavedInstance.getInt(Drawer.BUNDLE_STICKY_FOOTER_SELECTION_APPENDED, -1), null);
com.mikepenz.fastadapterFastAdapterdeselect

Javadoc

deselects all selections

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,
  • addAdapter,
  • getItemId,
  • getItemViewType,
  • getPreItemCount,
  • getSelectedItems

Popular in Java

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • getApplicationContext (Context)
  • Path (java.nio.file)
  • Permission (java.security)
    Legacy security code; do not use.
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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