public class MiniDrawer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
ITEM |
protected com.mikepenz.fastadapter.adapters.FastItemAdapter<IDrawerItem> |
mAdapter |
static int |
PROFILE |
| Constructor and Description |
|---|
MiniDrawer() |
| Modifier and Type | Method and Description |
|---|---|
android.view.View |
build(android.content.Context ctx)
build the MiniDrawer
|
void |
createItems()
creates the items for the MiniDrawer
|
IDrawerItem |
generateMiniDrawerItem(IDrawerItem drawerItem)
generates a MiniDrawerItem from a IDrawerItem
|
AccountHeader |
getAccountHeader()
get the AccountHeader used to fill the this MiniDrawer
|
com.mikepenz.fastadapter.FastAdapter<IDrawerItem> |
getAdapter()
get the FastAdapter of this MiniDrawer
|
ICrossfader |
getCrossFader()
get the Crossfader used for this MiniDrawer
|
Drawer |
getDrawer()
get the Drawer used to fill this MiniDrawer
|
com.mikepenz.fastadapter.adapters.ItemAdapter<IDrawerItem> |
getItemAdapter()
get the ItemAdapter of this MiniDrawer
|
int |
getMiniDrawerType(IDrawerItem drawerItem)
gets the type of a IDrawerItem
|
com.mikepenz.fastadapter.FastAdapter.OnClickListener |
getOnMiniDrawerItemClickListener() |
com.mikepenz.fastadapter.FastAdapter.OnLongClickListener |
getOnMiniDrawerItemLongClickListener() |
android.support.v7.widget.RecyclerView |
getRecyclerView()
get the RecyclerView of this MiniDrawer
|
boolean |
onItemClick(IDrawerItem selectedDrawerItem)
call this method to trigger the onItemClick on the MiniDrawer
|
void |
onProfileClick()
call this method to trigger the onProfileClick on the MiniDrawer
|
void |
setSelection(long identifier)
set the selection of the MiniDrawer
|
void |
updateItem(long identifier)
update a MiniDrawerItem (after updating the main Drawer) via its identifier
|
MiniDrawer |
withAccountHeader(AccountHeader accountHeader)
Provide the AccountHeader which will be used as the dataSource for the profiles
|
MiniDrawer |
withCrossFader(ICrossfader crossFader)
Provide the Crossfader implementation which is used with this MiniDrawer
|
MiniDrawer |
withDrawer(Drawer drawer)
Provide the Drawer which will be used as dataSource for the drawerItems
|
MiniDrawer |
withEnableProfileClick(boolean enableProfileClick)
set to false if you do not want the profile image to toggle to the normal drawers profile selection
|
MiniDrawer |
withEnableSelectedMiniDrawerItemBackground(boolean enableSelectedMiniDrawerItemBackground)
set to true if you want to display the background for the miniDrawerItem
|
MiniDrawer |
withIncludeSecondaryDrawerItems(boolean includeSecondaryDrawerItems)
set to true if you also want to display secondaryDrawerItems
|
MiniDrawer |
withInnerShadow(boolean innerShadow)
set to true if you want to show the innerShadow on the MiniDrawer
|
MiniDrawer |
withInRTL(boolean inRTL)
set to true if you want the MiniDrawer in RTL mode
|
MiniDrawer |
withOnMiniDrawerItemClickListener(com.mikepenz.fastadapter.FastAdapter.OnClickListener<IDrawerItem> onMiniDrawerItemClickListener)
Define an onClickListener for the MiniDrawer item adapter.
|
MiniDrawer |
withOnMiniDrawerItemLongClickListener(com.mikepenz.fastadapter.FastAdapter.OnLongClickListener<IDrawerItem> onMiniDrawerItemLongClickListener)
Define an onLongClickListener for the MiniDrawer item adapter
|
public static final int PROFILE
public static final int ITEM
protected com.mikepenz.fastadapter.adapters.FastItemAdapter<IDrawerItem> mAdapter
public MiniDrawer withDrawer(@NonNull Drawer drawer)
drawer - public MiniDrawer withAccountHeader(@NonNull AccountHeader accountHeader)
accountHeader - public MiniDrawer withCrossFader(@NonNull ICrossfader crossFader)
crossFader - public MiniDrawer withInnerShadow(boolean innerShadow)
innerShadow - public MiniDrawer withInRTL(boolean inRTL)
inRTL - public MiniDrawer withIncludeSecondaryDrawerItems(boolean includeSecondaryDrawerItems)
includeSecondaryDrawerItems - public MiniDrawer withEnableSelectedMiniDrawerItemBackground(boolean enableSelectedMiniDrawerItemBackground)
enableSelectedMiniDrawerItemBackground - public MiniDrawer withEnableProfileClick(boolean enableProfileClick)
enableProfileClick - public MiniDrawer withOnMiniDrawerItemClickListener(com.mikepenz.fastadapter.FastAdapter.OnClickListener<IDrawerItem> onMiniDrawerItemClickListener)
onMiniDrawerItemClickListener - public MiniDrawer withOnMiniDrawerItemLongClickListener(com.mikepenz.fastadapter.FastAdapter.OnLongClickListener<IDrawerItem> onMiniDrawerItemLongClickListener)
onMiniDrawerItemLongClickListener - public android.support.v7.widget.RecyclerView getRecyclerView()
public com.mikepenz.fastadapter.FastAdapter<IDrawerItem> getAdapter()
public com.mikepenz.fastadapter.adapters.ItemAdapter<IDrawerItem> getItemAdapter()
public Drawer getDrawer()
public AccountHeader getAccountHeader()
public ICrossfader getCrossFader()
public com.mikepenz.fastadapter.FastAdapter.OnClickListener getOnMiniDrawerItemClickListener()
public com.mikepenz.fastadapter.FastAdapter.OnLongClickListener getOnMiniDrawerItemLongClickListener()
public IDrawerItem generateMiniDrawerItem(IDrawerItem drawerItem)
drawerItem - public int getMiniDrawerType(IDrawerItem drawerItem)
drawerItem - public android.view.View build(android.content.Context ctx)
ctx - public void onProfileClick()
public boolean onItemClick(IDrawerItem selectedDrawerItem)
selectedDrawerItem - public void setSelection(long identifier)
identifier - the identifier of the item which should be selected (-1 for none)public void updateItem(long identifier)
identifier - the identifier of the item which was updatedpublic void createItems()