/** * 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; }
if (mMultiSelect) { mAdapter.withSelectOnLongClick(false); mAdapter.withAllowDeselection(true);
mAdapter = FastAdapter.with(mItemAdapter); mAdapter.withSelectable(true); mAdapter.withAllowDeselection(false); mRecyclerView.setAdapter(mAdapter);