一个Android模板material design导航抽屉:android-material-drawer-template
jopen
11年前
android-material-drawer-template是一个Android模板material design导航抽屉。
Customization
- Change your drawer item on:
drawer_row.xml - Make sure you change
NavigationDrawerAdapterto populate theViewHolderwith the new xml layout. - If you want to set a different layout for the selected item refer to
onBindViewHoldermethod on theNavigationDrawerAdapter - If you want to display more information on each row, like an image for example, change the
NavigationItemand add what you need. Make sure you change it's constructor and edit also thegetMenu()method on the fragment.
Reminders
- Your activity must implement
NavigationDrawerCallbacks - You must call
NavigationDrawerFragment.setup()to setup the drawer. - You must
thetoolbar_default.xmlin all your activities's XML and set it to the supportActionBar withsetSupportActionBar(). Remember to extend the activity toActionBarActivity
