Android沉浸式通知栏的一个开源库SystemBarTint简单使用,android沉浸式状态栏
来源:互联网 发布:四川网络女主播德阳视 编辑:程序博客网 时间:2024/05/10 03:36
SystemBarTint项目地址:https://github.com/jgilfelt/SystemBarTint
使用:
public class BaseActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); initStatusBar(); } @Override protected void onDestroy() { super.onDestroy(); ButterKnife.unbind(this); } private void initStatusBar() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { setTranslucentStatus(true); } SystemBarTintManager tintManager = new SystemBarTintManager(this); tintManager.setStatusBarTintEnabled(true); tintManager.setNavigationBarTintEnabled(true); tintManager.setStatusBarTintColor(getResources().getColor(R.color.colorPrimaryDark)); } @TargetApi(19) private void setTranslucentStatus(boolean on) { Window win = getWindow(); WindowManager.LayoutParams winParams = win.getAttributes(); final int bits = WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS; if (on) { winParams.flags |= bits; } else { winParams.flags &= ~bits; } win.setAttributes(winParams); }}
0 0
- Android沉浸式通知栏的一个开源库SystemBarTint简单使用,android沉浸式状态栏
- 关于Android沉浸式通知栏的一个开源库SystemBarTint简单使用
- 关于Android沉浸式通知栏的一个开源库SystemBarTint简单使用
- 关于Android沉浸式通知栏的一个开源库SystemBarTint简单使用
- Android沉浸式状态栏SystemBarTint
- Android沉浸式状态栏SystemBarTint的使用方法
- Android沉浸式状态栏SystemBarTint的使用方法
- Android沉浸式状态栏SystemBarTint的使用方法
- Android沉浸式状态栏SystemBarTint的使用方法
- Android使用systembartint库实现沉浸式状态栏效果
- SystemBarTint沉浸式状态栏
- Android 实现沉浸式状态栏效果(systembartint库)
- Android沉浸式通知栏开源库SystemBarTint源码解析
- 沉浸式状态栏实现-SystemBarTint
- SystemBarTint实现沉浸式状态栏
- 沉浸式状态栏框架-SystemBarTint
- Android沉浸式状态栏的简单实现
- Android沉浸式状态栏的简单实现
- **MYSQL** 命令总结
- String、StringBuffer和StringBuilder
- java挑战高并发(5):volatile变量修饰符的使用与问题
- 关于Session 与Cookie
- word2vec 解析
- Android沉浸式通知栏的一个开源库SystemBarTint简单使用,android沉浸式状态栏
- EntityFramework与Ado.net的对比——EF优势何在?
- 2015级成员博客地址
- ios终端使用brew安装工具
- 数据结构的理解
- Maven中央存储库
- android之位置坐标
- VC开发ocx
- DLL/EXE查看工具Dumpbin