List of usage examples for android.view Window getStatusBarColor
@ColorInt public abstract int getStatusBarColor();
From source file:com.cyanogenmod.eleven.ui.activities.HomeActivity.java
private void updateStatusBarColor(int color) { final Window window = getWindow(); ObjectAnimator animator = ObjectAnimator.ofInt(window, "statusBarColor", window.getStatusBarColor(), color); animator.setEvaluator(new ArgbEvaluator()); animator.setDuration(300);//from www .j ava 2s . c om animator.start(); }
From source file:com.microntek.music.MusicActivity.java
private void updateStatusBarColor(int color) { if (color == Color.TRANSPARENT) { color = getResources().getColor(R.color.primary_dark); }//from w w w . j a v a 2 s . co m final Window window = getWindow(); ObjectAnimator animator = ObjectAnimator.ofInt(window, "statusBarColor", window.getStatusBarColor(), color); animator.setEvaluator(new ArgbEvaluator()); animator.setDuration(300); animator.start(); }