当前位置: 首页>>代码示例>>Java>>正文


Java StatusBarUtil.setColorForDrawerLayout方法代码示例

本文整理汇总了Java中com.jaeger.library.StatusBarUtil.setColorForDrawerLayout方法的典型用法代码示例。如果您正苦于以下问题:Java StatusBarUtil.setColorForDrawerLayout方法的具体用法?Java StatusBarUtil.setColorForDrawerLayout怎么用?Java StatusBarUtil.setColorForDrawerLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.jaeger.library.StatusBarUtil的用法示例。


在下文中一共展示了StatusBarUtil.setColorForDrawerLayout方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onCreate

import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_navigation_view);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);

    FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
    fab.setOnClickListener(view -> Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
            .setAction("Action", null).show());

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
            this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    drawer.setDrawerListener(toggle);
    toggle.syncState();

    NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
    //navigationView.setItemIconTintList(null);
    navigationView.setNavigationItemSelectedListener(this);
    StatusBarUtil.setColorForDrawerLayout(this,drawer,0,50);

}
 
开发者ID:ruinszero,项目名称:RuinsAndroidLibrary,代码行数:24,代码来源:NavigationViewActivity.java

示例2: initView

import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
private void initView() {
    mToolbar = (Toolbar) findViewById(R.id.tool_bar);
    mToolbar.setTitle(R.string.app_name);
    setSupportActionBar(mToolbar);
    mTabLayout = (TabLayout) this.findViewById(R.id.tab_layout);
    mViewPager = (ViewPager) this.findViewById(R.id.view_pager);
    mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
    StatusBarUtil.setColorForDrawerLayout(MainActivity.this, mDrawerLayout, getResources().getColor(R
            .color.colorPrimaryDark));
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
            this, mDrawerLayout, mToolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    mDrawerLayout.addDrawerListener(toggle);
    toggle.syncState();
    mNavigationView = (NavigationView) findViewById(R.id.nav_view);
    mNavigationView.setNavigationItemSelectedListener(this);
    mMainNavigationHeader = new MainNavigationHeader(this, mNavigationView);
    mMainNavigationHeader.bindData();
    mAdapter = new FragmentAdapter(getSupportFragmentManager());
}
 
开发者ID:sungerk,项目名称:meiShi,代码行数:20,代码来源:MainActivity.java

示例3: initData

import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void initData(Bundle savedInstanceState) {
    initView();
    mSettingFragment = new SettingFragment();
    mHomeFragment = new HomeFragment();
    mAboutFragment = new AboutFragment();
    switchToHomePage();
    StatusBarUtil.setColorForDrawerLayout(MainActivity.this,
            mDataBinding.drawerlayout, Color.TRANSPARENT);
}
 
开发者ID:zyl409214686,项目名称:Mp3Cutter,代码行数:11,代码来源:MainActivity.java

示例4: onCreate

import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity4);

    mDrawerLayout = (DrawerLayout) findViewById( R.id.drawer_layout );
    mDrawerLayout.setDrawerShadow(R.mipmap.ic_launcher , GravityCompat.START);

    StatusBarUtil.setColorForDrawerLayout( Activity4.this  , mDrawerLayout , Color.BLUE) ;
}
 
开发者ID:zyj1609wz,项目名称:Android-StatusBarColor,代码行数:11,代码来源:Activity4.java

示例5: setStatusBar

import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void setStatusBar() {
    StatusBarUtil.setColorForDrawerLayout(this,
            (DrawerLayout) findViewById(R.id.drawer_layout),
            getResources().getColor(R.color.colorPrimaryDark),
            0);
}
 
开发者ID:Glooory,项目名称:FlatReader,代码行数:8,代码来源:MainActivity.java

示例6: setStatusBar

import com.jaeger.library.StatusBarUtil; //导入方法依赖的package包/类
@Override
protected void setStatusBar() {
    mStatusBarColor = getResources().getColor(R.color.colorPrimary);
    StatusBarUtil.setColorForDrawerLayout(this, (DrawerLayout) findViewById(R.id.drawer_layout), mStatusBarColor, mAlpha);
}
 
开发者ID:laobie,项目名称:StatusBarUtil,代码行数:6,代码来源:MainActivity.java


注:本文中的com.jaeger.library.StatusBarUtil.setColorForDrawerLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。