use of com.readystatesoftware.systembartint.SystemBarTintManager in project SimplifyReader by chentao0707.
the class BaseAppCompatActivity method setSystemBarTintDrawable.
/**
* use SytemBarTintManager
*
* @param tintDrawable
*/
protected void setSystemBarTintDrawable(Drawable tintDrawable) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
SystemBarTintManager mTintManager = new SystemBarTintManager(this);
if (tintDrawable != null) {
mTintManager.setStatusBarTintEnabled(true);
mTintManager.setTintDrawable(tintDrawable);
} else {
mTintManager.setStatusBarTintEnabled(false);
mTintManager.setTintDrawable(null);
}
}
}
use of com.readystatesoftware.systembartint.SystemBarTintManager in project StickerCamera by Skykai521.
the class BaseActivity method initWindow.
@TargetApi(19)
private void initWindow() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
SystemBarTintManager tintManager = new SystemBarTintManager(this);
tintManager.setStatusBarTintColor(getStatusBarColor());
tintManager.setStatusBarTintEnabled(true);
}
}
use of com.readystatesoftware.systembartint.SystemBarTintManager in project SystemBarTint by jgilfelt.
the class DefaultActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_default);
SystemBarTintManager tintManager = new SystemBarTintManager(this);
tintManager.setStatusBarTintEnabled(true);
tintManager.setNavigationBarTintEnabled(true);
}
use of com.readystatesoftware.systembartint.SystemBarTintManager in project SystemBarTint by jgilfelt.
the class MatchActionBarActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_match_actionbar);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setTranslucentStatus(true);
}
SystemBarTintManager tintManager = new SystemBarTintManager(this);
tintManager.setStatusBarTintEnabled(true);
tintManager.setStatusBarTintResource(R.color.statusbar_bg);
}
use of com.readystatesoftware.systembartint.SystemBarTintManager in project SeeWeather by xcc3641.
the class BaseActivity method setStatusBarColor.
/**
* 设置状态栏颜色
* 也就是所谓沉浸式状态栏
*/
@Deprecated
public void setStatusBarColor(int color) {
/**
* Android4.4以上 但是抽屉有点冲突,目前就重写一个方法暂时解决4.4的问题
*/
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
this.getWindow().addFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
SystemBarTintManager tintManager = new SystemBarTintManager(this);
tintManager.setStatusBarTintEnabled(true);
tintManager.setStatusBarTintResource(color);
}
}
Aggregations