Catalog introduction
- 1. About how to integrate
- 2. About how to use
- 3. About thanks
- 4. About version update instructions
- 5. About screenshot instructions
- 6. About other introductions
1. About how to integrate
2. About how to use
- 2.1 DrawerLayout setting the status bar
//为DrawerLayout 布局设置状态栏颜色,纯色
StatusBarUtils.setColorNoTranslucentForDrawerLayout(this, drawerLayout,getResources().getColor(R.color.colorTheme));
//为DrawerLayout 布局设置状态栏变色,也就是加上透明度
StatusBarUtils.setColorForDrawerLayout(this, drawerLayout,getResources().getColor(R.color.colorTheme), 0);
- 2.2 Set the status bar color
YCAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.colorAccent));
- 2.3 Set the status bar and toolbar color
YCAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.colorAccent));
- 2.4 Set the status bar to be transparent
YCAppBar.translucentStatusBar(this, true);
- 2.5 Set the status bar coordinatorLayout color
YCAppBar.setStatusBarColor(this, ContextCompat.getColor(this, R.color.colorPrimary));
- 2.6 Set the color of the status bar coordinatorLayout to be transparent
YCAppBar.setStatusBarColorForCollapsingToolbar(this, mAppBarLayout, collapsingToolbarLayout, toolbar, ContextCompat.getColor(this, R.color.colorPrimary));
- 2.7 Set the status bar color to white
YCAppBar.setStatusBarLightMode(this, Color.WHITE);
- 2.8 Set the status bar and toolbar color to white
YCAppBar.setStatusBarLightMode(this, Color.WHITE);
- 2.9 Set the status bar and coordinatorLayout to white
YCAppBar.setStatusBarLightForCollapsingToolbar(this, mAppBarLayout, collapsingToolbarLayout, toolbar, Color.WHITE);
3. About thanks
- Regarding the status bar, the principle is adopted, which is slowly summarized after reading some projects.
- Very useful, the specific usage has been organized into demo, welcome to look at the code directly, if you can trouble star!
- Thanks to the open source predecessors for their selfless dedication...
4. About version update instructions
- v1.0 updated on September 8, 2017
- v1.1 updated on December 5, 2017
- v1.3 updated on March 16, 2018
5. About screenshot instructions
- You can directly refer to the demo case
6. About other introductions
About my blog