Java Code Examples for com.jaeger.library.StatusBarUtil#setColorForDrawerLayout()

The following examples show how to use com.jaeger.library.StatusBarUtil#setColorForDrawerLayout() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MainActivity.java    From meiShi with Apache License 2.0 6 votes vote down vote up
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());
}
 
Example 2
Source File: MainActivity.java    From AcgClub with MIT License 5 votes vote down vote up
@Override
protected void setStatusBar() {
  StatusBarUtil.setColorForDrawerLayout(
      mContext,
      drawerLayout,
      mAppComponent.statusBarAttr().get(StatusBarConstants.COLOR),
      mAppComponent.statusBarAttr().get(StatusBarConstants.ALPHA)
  );
}
 
Example 3
Source File: MainActivity.java    From Mp3Cutter with GNU General Public License v3.0 5 votes vote down vote up
@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);
}
 
Example 4
Source File: Activity4.java    From Android-StatusBarColor with Artistic License 2.0 5 votes vote down vote up
@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) ;
}