use of com.readystatesoftware.systembartint.SystemBarTintManager in project ARChon-Packager by bpear96.
the class activityWizard method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_wizard);
start = this;
// Only set the tint if the device is running KitKat or above
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
SystemBarTintManager tintManager = new SystemBarTintManager(this);
tintManager.setStatusBarTintEnabled(true);
// Holo light action bar color is #DDDDDD
int actionBarColor = Color.parseColor("#283339");
tintManager.setStatusBarTintColor(actionBarColor);
}
}
use of com.readystatesoftware.systembartint.SystemBarTintManager in project Notes by lguipeng.
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 SimplifyReader by chentao0707.
the class BasePlayerActivity 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 SimplifyReader by chentao0707.
the class BaseFragmentActivity 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 SeriesGuide by UweTrottmann.
the class MovieDetailsActivity method setupViews.
private void setupViews() {
if (AndroidUtils.isKitKatOrHigher()) {
// fix padding with translucent status bar
// warning: status bar not always translucent (e.g. Nexus 10)
// (using fitsSystemWindows would not work correctly with multiple views)
mSystemBarTintManager = new SystemBarTintManager(this);
int insetTop = mSystemBarTintManager.getConfig().getPixelInsetTop(false);
ViewGroup actionBarToolbar = (ViewGroup) findViewById(R.id.sgToolbar);
ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) actionBarToolbar.getLayoutParams();
layoutParams.setMargins(layoutParams.leftMargin, layoutParams.topMargin + insetTop, layoutParams.rightMargin, layoutParams.bottomMargin);
}
}
Aggregations