com.mikepenz.materialdrawer.Drawer.setToolbar()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(102)

本文整理了Java中com.mikepenz.materialdrawer.Drawer.setToolbar()方法的一些代码示例,展示了Drawer.setToolbar()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Drawer.setToolbar()方法的具体详情如下:
包路径:com.mikepenz.materialdrawer.Drawer
类名称:Drawer
方法名:setToolbar

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);
}

相关文章