/** * 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; }
mAdapter.withMultiSelect(mMultiSelect); if (mMultiSelect) { mAdapter.withSelectOnLongClick(false);
mFastAdapter.withMultiSelect(true); mFastAdapter.withSelectOnLongClick(true); mFastAdapter.withSelectionListener(new ISelectionListener<SimpleItem>() {
mFastAdapter.withMultiSelect(true); mFastAdapter.withSelectOnLongClick(true); mFastAdapter.withOnPreClickListener(new OnClickListener<IItem>() {
.addExtension(mExpandableExtension) .withSelectable(true) .withMultiSelect(true) .withSelectOnLongClick(true) .withOnPreClickListener(new OnClickListener<IItem>() {
mFastAdapter.withMultiSelect(true); mFastAdapter.withSelectOnLongClick(false); selectExtension = mFastAdapter.getExtension(SelectExtension.class);
mFastAdapter.withMultiSelect(true); mFastAdapter.withSelectOnLongClick(false);