本文整理了Java中com.mikepenz.materialdrawer.Drawer.setToolbar()
方法的一些代码示例,展示了Drawer.setToolbar()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawer.setToolbar()
方法的具体详情如下:
包路径:com.mikepenz.materialdrawer.Drawer
类名称:Drawer
方法名:setToolbar
[英]Sets the toolbar which should be used in combination with the drawer This will handle the ActionBarDrawerToggle for you. Do not set this if you are in a sub activity and want to handle the back arrow on your own
[中]设置应与抽屉结合使用的工具栏,这将为您处理ActionBarDrawerToggle。如果您在子活动中并且希望自己处理返回箭头,请不要设置此选项
代码示例来源:origin: mikepenz/MaterialDrawer
/**
* Sets the toolbar which should be used in combination with the drawer
* This will handle the ActionBarDrawerToggle for you.
* Do not set this if you are in a sub activity and want to handle the back arrow on your own
*
* @param activity
* @param toolbar the toolbar which is used in combination with the drawer
*/
public void setToolbar(@NonNull Activity activity, @NonNull Toolbar toolbar) {
setToolbar(activity, toolbar, false);
}
代码示例来源:origin: FreedomZZQ/YouJoin-Android
/**
* Sets the toolbar which should be used in combination with the drawer
* This will handle the ActionBarDrawerToggle for you.
* Do not set this if you are in a sub activity and want to handle the back arrow on your own
*
* @param activity
* @param toolbar the toolbar which is used in combination with the drawer
*/
public void setToolbar(@NonNull Activity activity, @NonNull Toolbar toolbar) {
setToolbar(activity, toolbar, false);
}
内容来源于网络,如有侵权,请联系作者删除!