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

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

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

origin: mikepenz/FastAdapter

/**
 * re-selects all elements stored in the savedInstanceState
 * IMPORTANT! Call this method only after all items where added to the adapters again. Otherwise it may select wrong items!
 *
 * @param savedInstanceState If the activity is being re-initialized after
 *                           previously being shut down then this Bundle contains the data it most
 *                           recently supplied in Note: Otherwise it is null.
 * @return this
 */
public FastAdapter<Item> withSavedInstanceState(Bundle savedInstanceState) {
  return withSavedInstanceState(savedInstanceState, "");
}
origin: mikepenz/FastAdapter

  @Override
  public void run() {
    //add some dummy data
    mItemAdapter.add(ImageDummyData.getSimpleImageItems());
    //restore selections (this has to be done after the items were added
    mFastAdapter.withSavedInstanceState(savedInstanceState);
  }
}, 50);
origin: mikepenz/MaterialDrawer

/**
 * helper method to reset to the original drawerContent
 */
public void resetDrawerContent() {
  if (switchedDrawerContent()) {
    //set the new items
    setOnDrawerItemClickListener(originalOnDrawerItemClickListener);
    setOnDrawerItemLongClickListener(originalOnDrawerItemLongClickListener);
    setItems(originalDrawerItems, true);
    getAdapter().withSavedInstanceState(originalDrawerState);
    //remove the references
    originalOnDrawerItemClickListener = null;
    originalOnDrawerItemLongClickListener = null;
    originalDrawerItems = null;
    originalDrawerState = null;
    //if we switch back scroll back to the top
    mDrawerBuilder.mRecyclerView.smoothScrollToPosition(0);
    //show the stickyFooter and it's shadow again
    if (getStickyFooter() != null) {
      getStickyFooter().setVisibility(View.VISIBLE);
    }
    if (getStickyFooterShadow() != null) {
      getStickyFooterShadow().setVisibility(View.VISIBLE);
    }
    //if we currently show the accountHeader selection list make sure to reset this attr
    if (mDrawerBuilder.mAccountHeader != null && mDrawerBuilder.mAccountHeader.mAccountHeaderBuilder != null) {
      mDrawerBuilder.mAccountHeader.mAccountHeaderBuilder.mSelectionListShown = false;
    }
  }
}
origin: mikepenz/MaterialDrawer

if (!mAppended) {
  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);
origin: mikepenz/FastAdapter

fastAdapter.withSavedInstanceState(savedInstanceState);
origin: mikepenz/FastAdapter

fastAdapter.withSavedInstanceState(savedInstanceState);
origin: mikepenz/FastAdapter

fastAdapter.withSavedInstanceState(savedInstanceState);
origin: mikepenz/FastAdapter

fastAdapter.withSavedInstanceState(savedInstanceState);
origin: mikepenz/FastAdapter

fastAdapter.withSavedInstanceState(savedInstanceState);
origin: mikepenz/FastAdapter

mFastAdapter.withSavedInstanceState(savedInstanceState);
origin: mikepenz/FastAdapter

mFastAdapter.withSavedInstanceState(savedInstanceState);
origin: mikepenz/ItemAnimators

mFastAdapter.withSavedInstanceState(savedInstanceState);
com.mikepenz.fastadapterFastAdapterwithSavedInstanceState

Javadoc

re-selects all elements stored in the savedInstanceState IMPORTANT! Call this method only after all items where added to the adapters again. Otherwise it may select wrong items!

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

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • findViewById (Activity)
  • getApplicationContext (Context)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for WebStorm
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