android.support.v4.widget.DrawerLayout.setStatusBarBackground()方法的使用及代码示例

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

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

DrawerLayout.setStatusBarBackground介绍

[英]Set a drawable to draw in the insets area for the status bar. Note that this will only be activated if this DrawerLayout fitsSystemWindows.
[中]在状态栏的插入区域中设置可绘制的。请注意,仅当抽屉布局适合系统窗口时,此选项才会激活。

代码示例

代码示例来源:origin: WhiteDG/BihuDaily

private void initDrawerLayout() {
    mDrawerLayout.setStatusBarBackground(R.color.colorPrimaryDark);
//        assert navView != null;
    setupDrawerContent(navView);
    View view = navView.getHeaderView(0);
//        assert llDrawer != null;
//        setupDrawerContent(llDrawer);
    tvMyStar = (TextView) view.findViewById(R.id.tv_my_star);
    tvOfflineDownload = (TextView) view.findViewById(R.id.tv_offline_download);
    llNavUser = (LinearLayout) view.findViewById(R.id.ll_nav_user);
  }

代码示例来源:origin: attentiveness/News

protected void setup(int barIconId) {
  setSupportActionBar(this.mToolbar);
  ActionBar actionBar = getSupportActionBar();
  if (actionBar != null) {
    if (barIconId > 0) {
      actionBar.setHomeAsUpIndicator(barIconId);
    }
    actionBar.setDisplayHomeAsUpEnabled(true);
  }
  if (this.mDrawerLayout != null) {
    this.mDrawerLayout.setStatusBarBackground(R.color.colorPrimaryDark);
  }
  if (this.mNavigationView != null) {
    setupDrawerContent(this.mNavigationView);
  }
}

相关文章