/** * define this if you want enable hasStableIds for the adapter which is generated. * WARNING: only use this if you have set an identifer for all of your items else this could cause * many weird things * * @param hasStableIds * @return */ public DrawerBuilder withHasStableIds(boolean hasStableIds) { this.mHasStableIds = hasStableIds; if (mAdapter != null) { mAdapter.setHasStableIds(hasStableIds); } return this; }
/** * the setHasStableIds is managed by the FastAdapter so forward this correctly * * @param hasStableIds */ @Override public void setHasStableIds(boolean hasStableIds) { mFastAdapter.setHasStableIds(hasStableIds); }
/** * the setHasStableIds is managed by the FastAdapter so forward this correctly * * @param hasStableIds */ @Override public void setHasStableIds(boolean hasStableIds) { mFastAdapter.setHasStableIds(hasStableIds); }
/** * default CTOR */ public FastAdapter() { setHasStableIds(true); }
/** * 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; }
fastAdapter.setHasStableIds(true);
mFastAdapter.setHasStableIds(true); mFastAdapter.withSelectable(true); mFastAdapter.withMultiSelect(true);