标签:
4.4 不可能向 5.0 一行代码搞定。
默认是黑色。
字节码,反射。通过反射得到状态栏的高度。
黑色 变成 透明, 然后拉伸状态栏。
A ndroid 获取屏幕高度、标题高度、状态栏高度详解
protected void initSystemBar() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { setTranslucentStatus(true); SystemBarTintManager tintManager = new SystemBarTintManager(this); tintManager.setStatusBarTintEnabled(true); tintManager.setStatusBarTintResource(mSataeBarBackground); } }
标签:
原文地址:http://www.cnblogs.com/zrui513/p/4946311.html