public class DrawerBuilder
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected AccountHeader |
mAccountHeader |
protected boolean |
mAccountHeaderSticky |
protected android.support.v7.app.ActionBarDrawerToggle |
mActionBarDrawerToggle |
protected boolean |
mActionBarDrawerToggleEnabled |
protected android.app.Activity |
mActivity |
protected com.mikepenz.fastadapter.FastAdapter<IDrawerItem> |
mAdapter |
protected android.support.v7.widget.RecyclerView.Adapter |
mAdapterWrapper |
protected boolean |
mAnimateActionBarDrawerToggle |
protected boolean |
mAppended |
protected boolean |
mCloseOnClick |
protected int |
mCurrentStickyFooterSelection |
protected android.view.View |
mCustomView |
protected int |
mDelayDrawerClickEvent |
protected int |
mDelayOnDrawerClose |
protected java.lang.Boolean |
mDisplayBelowStatusBar |
protected java.lang.Integer |
mDrawerGravity |
protected android.support.v4.widget.DrawerLayout |
mDrawerLayout |
protected int |
mDrawerWidth |
protected boolean |
mFireInitialOnClick |
protected com.mikepenz.fastadapter.adapters.FooterAdapter<IDrawerItem> |
mFooterAdapter |
protected boolean |
mFooterClickable |
protected boolean |
mFooterDivider |
protected android.view.View |
mFooterView |
protected boolean |
mFullscreen |
protected boolean |
mGenerateMiniDrawer |
protected boolean |
mHasStableIds |
protected com.mikepenz.fastadapter.adapters.HeaderAdapter<IDrawerItem> |
mHeaderAdapter |
protected boolean |
mHeaderDivider |
protected boolean |
mHeaderPadding |
protected android.view.View |
mHeaderView |
protected com.mikepenz.fastadapter.adapters.ItemAdapter<IDrawerItem> |
mItemAdapter |
protected android.support.v7.widget.RecyclerView.ItemAnimator |
mItemAnimator |
protected android.support.v7.widget.RecyclerView.LayoutManager |
mLayoutManager |
protected com.mikepenz.materialize.Materialize |
mMaterialize |
protected MiniDrawer |
mMiniDrawer |
protected boolean |
mMultiSelect |
protected Drawer.OnDrawerItemClickListener |
mOnDrawerItemClickListener |
protected Drawer.OnDrawerItemLongClickListener |
mOnDrawerItemLongClickListener |
protected Drawer.OnDrawerListener |
mOnDrawerListener |
protected Drawer.OnDrawerNavigationListener |
mOnDrawerNavigationListener |
protected android.support.v7.widget.RecyclerView |
mRecyclerView |
protected android.view.ViewGroup |
mRootView |
protected android.os.Bundle |
mSavedInstance |
protected boolean |
mScrollToTopAfterClick |
protected int |
mSelectedItemIdentifier |
protected int |
mSelectedItemPosition |
protected boolean |
mShowDrawerOnFirstLaunch |
protected int |
mSliderBackgroundColor |
protected int |
mSliderBackgroundColorRes |
protected android.graphics.drawable.Drawable |
mSliderBackgroundDrawable |
protected int |
mSliderBackgroundDrawableRes |
protected com.mikepenz.materialize.view.ScrimInsetsRelativeLayout |
mSliderLayout |
protected java.util.List<IDrawerItem> |
mStickyDrawerItems |
protected boolean |
mStickyFooterDivider |
protected boolean |
mStickyFooterShadow |
protected android.view.View |
mStickyFooterShadowView |
protected android.view.ViewGroup |
mStickyFooterView |
protected android.view.View |
mStickyHeaderView |
protected boolean |
mSystemUIHidden |
protected android.support.v7.widget.Toolbar |
mToolbar |
protected boolean |
mTranslucentNavigationBar |
protected boolean |
mTranslucentNavigationBarProgrammatically |
protected boolean |
mTranslucentStatusBar |
protected boolean |
mUsed |
| Constructor and Description |
|---|
DrawerBuilder()
default constructor
|
DrawerBuilder(android.app.Activity activity)
Construct a Drawer by passing the activity to use for the generation
|
| Modifier and Type | Method and Description |
|---|---|
DrawerBuilder |
addDrawerItems(IDrawerItem... drawerItems)
Add a initial DrawerItem or a DrawerItem Array for the Drawer
|
DrawerBuilder |
addStickyDrawerItems(IDrawerItem... stickyDrawerItems)
Add a initial DrawerItem or a DrawerItem Array for the StickyDrawerFooter
|
Drawer |
append(Drawer result)
Call this method to append a new DrawerBuilder to a existing Drawer.
|
Drawer |
build()
Build and add the DrawerBuilder to your activity
|
Drawer |
buildForFragment()
Build and add the DrawerBuilder to your activity
|
Drawer |
buildView()
build the drawers content only.
|
protected boolean |
checkDrawerItem(int position,
boolean includeOffset)
check if the item is within the bounds of the list
|
protected void |
closeDrawerDelayed()
helper method to close the drawer delayed
|
protected com.mikepenz.fastadapter.FastAdapter<IDrawerItem> |
getAdapter()
get the adapter (null safe)
|
protected IDrawerItem |
getDrawerItem(int position)
get the drawerItem at a specific position
|
protected com.mikepenz.fastadapter.IItemAdapter<IDrawerItem> |
getFooterAdapter() |
protected com.mikepenz.fastadapter.IItemAdapter<IDrawerItem> |
getHeaderAdapter() |
protected com.mikepenz.fastadapter.IItemAdapter<IDrawerItem> |
getItemAdapter() |
protected void |
handleDrawerNavigation(android.app.Activity activity,
boolean recreateActionBarDrawerToggle)
handles the different logics for the Drawer Navigation Listeners / Indications (ActionBarDrawertoggle)
|
DrawerBuilder |
inflateMenu(int menuRes)
Inflates the DrawerItems from a menu.xml
|
protected void |
resetStickyFooterSelection()
simple helper method to reset the selection of the sticky footer
|
DrawerBuilder |
withAccountHeader(AccountHeader accountHeader)
Add a AccountSwitcherHeader which will be used in this drawer instance.
|
DrawerBuilder |
withAccountHeader(AccountHeader accountHeader,
boolean accountHeaderSticky)
Add a AccountSwitcherHeader which will be used in this drawer instance.
|
DrawerBuilder |
withActionBarDrawerToggle(android.support.v7.app.ActionBarDrawerToggle actionBarDrawerToggle)
Add a custom ActionBarDrawerToggle which will be used in combination with this drawer.
|
DrawerBuilder |
withActionBarDrawerToggle(boolean actionBarDrawerToggleEnabled)
Set this to false if you don't need the included ActionBarDrawerToggle
|
DrawerBuilder |
withActionBarDrawerToggleAnimated(boolean actionBarDrawerToggleAnimated)
Set this to true if you want the ActionBarDrawerToggle to be animated.
|
DrawerBuilder |
withActivity(android.app.Activity activity)
Sets the activity which will be generated for the generation
The activity is required and will be used to inflate the content in.
|
DrawerBuilder |
withAdapter(com.mikepenz.fastadapter.FastAdapter<IDrawerItem> adapter)
Define a custom Adapter which will be used in the drawer
NOTE: this is not recommender
WARNING: if you do this after adding items you will loose those!
|
DrawerBuilder |
withAdapterWrapper(android.support.v7.widget.RecyclerView.Adapter adapterWrapper)
Defines a Adapter which wraps the main Adapter used in the RecyclerView to allow extended navigation and other stuff
|
DrawerBuilder |
withCloseOnClick(boolean closeOnClick)
Set this to false if the drawer should stay opened after an item was clicked
|
DrawerBuilder |
withCustomView(android.view.View customView)
Pass a custom view if you need a completely custom drawer
content
|
DrawerBuilder |
withDelayDrawerClickEvent(int delayDrawerClickEvent)
Define the delay for the drawer click event after a click.
|
DrawerBuilder |
withDelayOnDrawerClose(int delayOnDrawerClose)
Define the delay for the drawer close operation after a click.
|
DrawerBuilder |
withDisplayBelowStatusBar(boolean displayBelowStatusBar)
Sets that the slider of this Drawer should be displayed below the statusBar even with a translucentStatusBar
|
DrawerBuilder |
withDrawerGravity(int gravity)
Set the gravity for the drawer.
|
DrawerBuilder |
withDrawerItems(java.util.List<IDrawerItem> drawerItems)
Set the initial List of IDrawerItems for the Drawer
|
DrawerBuilder |
withDrawerLayout(android.support.v4.widget.DrawerLayout drawerLayout)
Pass a custom DrawerLayout which will be used.
|
DrawerBuilder |
withDrawerLayout(int resLayout)
Pass a custom DrawerLayout Resource which will be used.
|
DrawerBuilder |
withDrawerWidthDp(int drawerWidthDp)
Set the DrawerBuilder width with a dp value
|
DrawerBuilder |
withDrawerWidthPx(int drawerWidthPx)
Set the DrawerBuilder width with a pixel value
|
DrawerBuilder |
withDrawerWidthRes(int drawerWidthRes)
Set the DrawerBuilder width with a dimension resource
|
DrawerBuilder |
withFireOnInitialOnClick(boolean fireOnInitialOnClick)
Set this to true if you love to get an initial onClick event after the build method is called
|
DrawerBuilder |
withFooter(int footerViewRes)
Add a footer to the DrawerBuilder ListView defined by a resource.
|
DrawerBuilder |
withFooter(android.view.View footerView)
Add a footer to the DrawerBuilder ListView.
|
DrawerBuilder |
withFooterClickable(boolean footerClickable)
Set this to true if you want the footer to be clickable
|
DrawerBuilder |
withFooterDivider(boolean footerDivider)
Set this to false if you don't need the divider above the footer
|
DrawerBuilder |
withFullscreen(boolean fullscreen)
Set to true if the used theme has a translucent statusBar
and navigationBar and you want to manage the padding on your own.
|
DrawerBuilder |
withGenerateMiniDrawer(boolean generateMiniDrawer)
define if the DrawerBuilder should also generate a MiniDrawer for th
|
DrawerBuilder |
withHasStableIds(boolean hasStableIds)
define this if you want enable hasStableIds for the adapter which is generated.
|
DrawerBuilder |
withHeader(int headerViewRes)
Add a header to the DrawerBuilder ListView defined by a resource.
|
DrawerBuilder |
withHeader(android.view.View headerView)
Add a header to the DrawerBuilder ListView.
|
DrawerBuilder |
withHeaderDivider(boolean headerDivider)
Set this to false if you don't need the divider below the header
|
DrawerBuilder |
withHeaderPadding(boolean headerPadding)
Set this to false if you don't need the padding below the header
|
DrawerBuilder |
withInnerShadow(boolean innerShadow)
sets if the drawer should show an inner shadow or not
|
DrawerBuilder |
withItemAnimator(android.support.v7.widget.RecyclerView.ItemAnimator itemAnimator)
defines the itemAnimator to be used in conjunction with the RecyclerView
|
DrawerBuilder |
withMultiSelect(boolean multiSelect)
set this to true if you want to enable multiSelect mode inside the drawer.
|
DrawerBuilder |
withOnDrawerItemClickListener(Drawer.OnDrawerItemClickListener onDrawerItemClickListener)
Define a OnDrawerItemClickListener for this Drawer
|
DrawerBuilder |
withOnDrawerItemLongClickListener(Drawer.OnDrawerItemLongClickListener onDrawerItemLongClickListener)
Define a OnDrawerItemLongClickListener for this Drawer
|
DrawerBuilder |
withOnDrawerListener(Drawer.OnDrawerListener onDrawerListener)
Define a OnDrawerListener for this Drawer
|
DrawerBuilder |
withOnDrawerNavigationListener(Drawer.OnDrawerNavigationListener onDrawerNavigationListener)
Define a OnDrawerNavigationListener for this Drawer
|
DrawerBuilder |
withRecyclerView(android.support.v7.widget.RecyclerView recyclerView)
Define a custom RecyclerView which will be used in the drawer
NOTE: this is not recommended
|
DrawerBuilder |
withRootView(int rootViewRes)
Sets the rootView which will host the DrawerLayout
The content of this view will be extracted and added as the new content inside the drawerLayout
|
DrawerBuilder |
withRootView(android.view.ViewGroup rootView)
Sets the rootView which will host the DrawerLayout
The content of this view will be extracted and added as the new content inside the drawerLayout
|
DrawerBuilder |
withSavedInstance(android.os.Bundle savedInstance)
Set the Bundle (savedInstance) which is passed by the activity.
|
DrawerBuilder |
withScrollToTopAfterClick(boolean scrollToTopAfterClick)
defines if the drawer should scroll to top after click
|
DrawerBuilder |
withSelectedItem(int selectedItemIdentifier)
Set this to the identifier of the item, you would love to select upon start
|
DrawerBuilder |
withSelectedItemByPosition(int selectedItemPosition)
Set this to the index of the item, you would love to select upon start
|
DrawerBuilder |
withShowDrawerOnFirstLaunch(boolean showDrawerOnFirstLaunch)
define if the DrawerBuilder is shown on the first launch
|
DrawerBuilder |
withSliderBackgroundColor(int sliderBackgroundColor)
Set the background color for the Slider.
|
DrawerBuilder |
withSliderBackgroundColorRes(int sliderBackgroundColorRes)
Set the background color for the Slider from a Resource.
|
DrawerBuilder |
withSliderBackgroundDrawable(android.graphics.drawable.Drawable sliderBackgroundDrawable)
Set the background drawable for the Slider.
|
DrawerBuilder |
withSliderBackgroundDrawableRes(int sliderBackgroundDrawableRes)
Set the background drawable for the Slider from a Resource.
|
DrawerBuilder |
withStickyDrawerItems(java.util.List<IDrawerItem> stickyDrawerItems)
Set the initial List of IDrawerItems for the StickyDrawerFooter
|
DrawerBuilder |
withStickyFooter(int stickyFooterRes)
Add a sticky footer below the DrawerBuilder ListView defined by a resource.
|
DrawerBuilder |
withStickyFooter(android.view.ViewGroup stickyFooter)
Add a sticky footer below the DrawerBuilder ListView.
|
DrawerBuilder |
withStickyFooterDivider(boolean stickyFooterDivider)
Set this to true if you want the divider above the sticky footer
|
DrawerBuilder |
withStickyFooterShadow(boolean stickyFooterShadow)
Set this to false if you don't want the shadow on top of the sticky footer
|
DrawerBuilder |
withStickyHeader(int stickyHeaderRes)
Add a sticky header below the DrawerBuilder ListView defined by a resource.
|
DrawerBuilder |
withStickyHeader(android.view.View stickyHeader)
Add a sticky header below the DrawerBuilder ListView.
|
DrawerBuilder |
withSystemUIHidden(boolean systemUIHidden)
Set to true if you use your app in complete fullscreen mode
with hidden statusBar and navigationBar
|
DrawerBuilder |
withToolbar(android.support.v7.widget.Toolbar toolbar)
Sets the toolbar which should be used in combination with the drawer
This will handle the ActionBarDrawerToggle for you.
|
DrawerBuilder |
withTranslucentNavigationBar(boolean translucentNavigationBar)
Set to true if you use a translucent NavigationBar
|
DrawerBuilder |
withTranslucentNavigationBarProgrammatically(boolean translucentNavigationBarProgrammatically)
set this to true if you want a translucent navigation bar.
|
DrawerBuilder |
withTranslucentStatusBar(boolean translucentStatusBar)
Sets that the view which hosts the DrawerLayout should have a translucent statusBar
This is true by default, so it's possible to display the drawer under the statusBar
|
protected boolean mUsed
protected int mCurrentStickyFooterSelection
protected boolean mAppended
protected android.app.Activity mActivity
protected android.support.v7.widget.RecyclerView.LayoutManager mLayoutManager
protected android.view.ViewGroup mRootView
protected com.mikepenz.materialize.Materialize mMaterialize
protected boolean mTranslucentStatusBar
protected java.lang.Boolean mDisplayBelowStatusBar
protected android.support.v7.widget.Toolbar mToolbar
protected boolean mTranslucentNavigationBar
protected boolean mTranslucentNavigationBarProgrammatically
protected boolean mFullscreen
protected boolean mSystemUIHidden
protected android.view.View mCustomView
protected android.support.v4.widget.DrawerLayout mDrawerLayout
protected com.mikepenz.materialize.view.ScrimInsetsRelativeLayout mSliderLayout
protected int mSliderBackgroundColor
protected int mSliderBackgroundColorRes
protected android.graphics.drawable.Drawable mSliderBackgroundDrawable
protected int mSliderBackgroundDrawableRes
protected int mDrawerWidth
protected java.lang.Integer mDrawerGravity
protected AccountHeader mAccountHeader
protected boolean mAccountHeaderSticky
protected boolean mAnimateActionBarDrawerToggle
protected boolean mActionBarDrawerToggleEnabled
protected android.support.v7.app.ActionBarDrawerToggle mActionBarDrawerToggle
protected boolean mScrollToTopAfterClick
protected android.view.View mHeaderView
protected boolean mHeaderDivider
protected boolean mHeaderPadding
protected android.view.View mStickyHeaderView
protected android.view.View mFooterView
protected boolean mFooterDivider
protected boolean mFooterClickable
protected android.view.ViewGroup mStickyFooterView
protected boolean mStickyFooterDivider
protected android.view.View mStickyFooterShadowView
protected boolean mStickyFooterShadow
protected boolean mFireInitialOnClick
protected boolean mMultiSelect
protected int mSelectedItemPosition
protected int mSelectedItemIdentifier
protected android.support.v7.widget.RecyclerView mRecyclerView
protected boolean mHasStableIds
protected com.mikepenz.fastadapter.FastAdapter<IDrawerItem> mAdapter
protected com.mikepenz.fastadapter.adapters.HeaderAdapter<IDrawerItem> mHeaderAdapter
protected com.mikepenz.fastadapter.adapters.ItemAdapter<IDrawerItem> mItemAdapter
protected com.mikepenz.fastadapter.adapters.FooterAdapter<IDrawerItem> mFooterAdapter
protected android.support.v7.widget.RecyclerView.Adapter mAdapterWrapper
protected android.support.v7.widget.RecyclerView.ItemAnimator mItemAnimator
protected java.util.List<IDrawerItem> mStickyDrawerItems
protected boolean mCloseOnClick
protected int mDelayOnDrawerClose
protected int mDelayDrawerClickEvent
protected Drawer.OnDrawerListener mOnDrawerListener
protected Drawer.OnDrawerItemClickListener mOnDrawerItemClickListener
protected Drawer.OnDrawerItemLongClickListener mOnDrawerItemLongClickListener
protected Drawer.OnDrawerNavigationListener mOnDrawerNavigationListener
protected boolean mShowDrawerOnFirstLaunch
protected boolean mGenerateMiniDrawer
protected MiniDrawer mMiniDrawer
protected android.os.Bundle mSavedInstance
public DrawerBuilder()
public DrawerBuilder(@NonNull
android.app.Activity activity)
activity - current activity which will contain the drawerpublic DrawerBuilder withActivity(@NonNull android.app.Activity activity)
activity - current activity which will contain the drawerpublic DrawerBuilder withRootView(@NonNull android.view.ViewGroup rootView)
rootView - a view which will get switched out by the DrawerLayout and added as its childpublic DrawerBuilder withRootView(@IdRes int rootViewRes)
rootViewRes - the id of a view which will get switched out by the DrawerLayout and added as its childpublic DrawerBuilder withTranslucentStatusBar(boolean translucentStatusBar)
translucentStatusBar - sets whether the statusBar is transparent (and the drawer is displayed under it) or notpublic DrawerBuilder withDisplayBelowStatusBar(boolean displayBelowStatusBar)
displayBelowStatusBar - sets wheter the slider of the drawer is displayed below the statusBar or notpublic DrawerBuilder withInnerShadow(boolean innerShadow)
innerShadow - sets wheter the drawer should display an inner shadow or notpublic DrawerBuilder withToolbar(@NonNull android.support.v7.widget.Toolbar toolbar)
toolbar - the toolbar which is used in combination with the drawerpublic DrawerBuilder withTranslucentNavigationBar(boolean translucentNavigationBar)
translucentNavigationBar - public DrawerBuilder withTranslucentNavigationBarProgrammatically(boolean translucentNavigationBarProgrammatically)
translucentNavigationBarProgrammatically - public DrawerBuilder withFullscreen(boolean fullscreen)
fullscreen - public DrawerBuilder withSystemUIHidden(boolean systemUIHidden)
systemUIHidden - public DrawerBuilder withCustomView(@NonNull android.view.View customView)
customView - public DrawerBuilder withDrawerLayout(@NonNull android.support.v4.widget.DrawerLayout drawerLayout)
drawerLayout - public DrawerBuilder withDrawerLayout(@LayoutRes int resLayout)
resLayout - public DrawerBuilder withSliderBackgroundColor(int sliderBackgroundColor)
sliderBackgroundColor - public DrawerBuilder withSliderBackgroundColorRes(@ColorRes int sliderBackgroundColorRes)
sliderBackgroundColorRes - public DrawerBuilder withSliderBackgroundDrawable(@NonNull android.graphics.drawable.Drawable sliderBackgroundDrawable)
sliderBackgroundDrawable - public DrawerBuilder withSliderBackgroundDrawableRes(@DrawableRes int sliderBackgroundDrawableRes)
sliderBackgroundDrawableRes - public DrawerBuilder withDrawerWidthPx(int drawerWidthPx)
drawerWidthPx - public DrawerBuilder withDrawerWidthDp(int drawerWidthDp)
drawerWidthDp - public DrawerBuilder withDrawerWidthRes(@DimenRes int drawerWidthRes)
drawerWidthRes - public DrawerBuilder withDrawerGravity(int gravity)
gravity - public DrawerBuilder withAccountHeader(@NonNull AccountHeader accountHeader)
accountHeader - public DrawerBuilder withAccountHeader(@NonNull AccountHeader accountHeader, boolean accountHeaderSticky)
accountHeader - accountHeaderSticky - public DrawerBuilder withActionBarDrawerToggleAnimated(boolean actionBarDrawerToggleAnimated)
actionBarDrawerToggleAnimated - public DrawerBuilder withActionBarDrawerToggle(boolean actionBarDrawerToggleEnabled)
actionBarDrawerToggleEnabled - public DrawerBuilder withActionBarDrawerToggle(@NonNull android.support.v7.app.ActionBarDrawerToggle actionBarDrawerToggle)
actionBarDrawerToggle - public DrawerBuilder withScrollToTopAfterClick(boolean scrollToTopAfterClick)
scrollToTopAfterClick - public DrawerBuilder withHeader(@NonNull android.view.View headerView)
headerView - public DrawerBuilder withHeader(@LayoutRes int headerViewRes)
headerViewRes - public DrawerBuilder withHeaderDivider(boolean headerDivider)
headerDivider - public DrawerBuilder withHeaderPadding(boolean headerPadding)
headerPadding - public DrawerBuilder withStickyHeader(@NonNull android.view.View stickyHeader)
stickyHeader - public DrawerBuilder withStickyHeader(@LayoutRes int stickyHeaderRes)
stickyHeaderRes - public DrawerBuilder withFooter(@NonNull android.view.View footerView)
footerView - public DrawerBuilder withFooter(@LayoutRes int footerViewRes)
footerViewRes - public DrawerBuilder withFooterClickable(boolean footerClickable)
footerClickable - public DrawerBuilder withFooterDivider(boolean footerDivider)
footerDivider - public DrawerBuilder withStickyFooter(@NonNull android.view.ViewGroup stickyFooter)
stickyFooter - public DrawerBuilder withStickyFooter(@LayoutRes int stickyFooterRes)
stickyFooterRes - public DrawerBuilder withStickyFooterDivider(boolean stickyFooterDivider)
stickyFooterDivider - public DrawerBuilder withStickyFooterShadow(boolean stickyFooterShadow)
stickyFooterShadow - public DrawerBuilder withFireOnInitialOnClick(boolean fireOnInitialOnClick)
fireOnInitialOnClick - public DrawerBuilder withMultiSelect(boolean multiSelect)
multiSelect - true if multiSelect is enabled (default: false)public DrawerBuilder withSelectedItemByPosition(int selectedItemPosition)
selectedItemPosition - public DrawerBuilder withSelectedItem(int selectedItemIdentifier)
selectedItemIdentifier - public DrawerBuilder withRecyclerView(@NonNull android.support.v7.widget.RecyclerView recyclerView)
recyclerView - public DrawerBuilder withHasStableIds(boolean hasStableIds)
hasStableIds - public DrawerBuilder withAdapter(@NonNull com.mikepenz.fastadapter.FastAdapter<IDrawerItem> adapter)
adapter - the FastAdapter to use with this drawerprotected com.mikepenz.fastadapter.FastAdapter<IDrawerItem> getAdapter()
protected com.mikepenz.fastadapter.IItemAdapter<IDrawerItem> getItemAdapter()
protected com.mikepenz.fastadapter.IItemAdapter<IDrawerItem> getHeaderAdapter()
protected com.mikepenz.fastadapter.IItemAdapter<IDrawerItem> getFooterAdapter()
public DrawerBuilder withAdapterWrapper(@NonNull android.support.v7.widget.RecyclerView.Adapter adapterWrapper)
adapterWrapper - public DrawerBuilder withItemAnimator(android.support.v7.widget.RecyclerView.ItemAnimator itemAnimator)
itemAnimator - public DrawerBuilder withDrawerItems(@NonNull java.util.List<IDrawerItem> drawerItems)
drawerItems - public DrawerBuilder addDrawerItems(@NonNull IDrawerItem... drawerItems)
drawerItems - public DrawerBuilder withStickyDrawerItems(@NonNull java.util.List<IDrawerItem> stickyDrawerItems)
stickyDrawerItems - public DrawerBuilder addStickyDrawerItems(@NonNull IDrawerItem... stickyDrawerItems)
stickyDrawerItems - public DrawerBuilder inflateMenu(@MenuRes int menuRes)
menuRes - public DrawerBuilder withCloseOnClick(boolean closeOnClick)
closeOnClick - public DrawerBuilder withDelayOnDrawerClose(int delayOnDrawerClose)
delayOnDrawerClose - the delay in MS (-1 to disable)public DrawerBuilder withDelayDrawerClickEvent(int delayDrawerClickEvent)
delayDrawerClickEvent - -1 to disablepublic DrawerBuilder withOnDrawerListener(@NonNull Drawer.OnDrawerListener onDrawerListener)
onDrawerListener - public DrawerBuilder withOnDrawerItemClickListener(@NonNull Drawer.OnDrawerItemClickListener onDrawerItemClickListener)
onDrawerItemClickListener - public DrawerBuilder withOnDrawerItemLongClickListener(@NonNull Drawer.OnDrawerItemLongClickListener onDrawerItemLongClickListener)
onDrawerItemLongClickListener - public DrawerBuilder withOnDrawerNavigationListener(@NonNull Drawer.OnDrawerNavigationListener onDrawerNavigationListener)
onDrawerNavigationListener - public DrawerBuilder withShowDrawerOnFirstLaunch(boolean showDrawerOnFirstLaunch)
showDrawerOnFirstLaunch - public DrawerBuilder withGenerateMiniDrawer(boolean generateMiniDrawer)
generateMiniDrawer - public DrawerBuilder withSavedInstance(android.os.Bundle savedInstance)
savedInstance - public Drawer build()
public Drawer buildForFragment()
protected void handleDrawerNavigation(android.app.Activity activity,
boolean recreateActionBarDrawerToggle)
public Drawer buildView()
public Drawer append(@NonNull Drawer result)
result - the Drawer.Result of an existing Drawerprotected void closeDrawerDelayed()
protected IDrawerItem getDrawerItem(int position)
position - protected boolean checkDrawerItem(int position,
boolean includeOffset)
position - includeOffset - protected void resetStickyFooterSelection()