use of com.yzy.supercleanmaster.utils.SystemBarTintManager in project superCleanMaster by joyoyao.
the class AutoStartManageActivity method applyKitKatTranslucency.
/**
* Apply KitKat specific translucency.
*/
private void applyKitKatTranslucency() {
// KitKat translucent navigation/status bar.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setTranslucentStatus(true);
SystemBarTintManager mTintManager = new SystemBarTintManager(this);
mTintManager.setStatusBarTintEnabled(true);
mTintManager.setNavigationBarTintEnabled(true);
// mTintManager.setTintColor(0xF00099CC);
mTintManager.setTintDrawable(UIElementsHelper.getGeneralActionBarBackground(this));
getActionBar().setBackgroundDrawable(UIElementsHelper.getGeneralActionBarBackground(this));
}
}
use of com.yzy.supercleanmaster.utils.SystemBarTintManager in project superCleanMaster by joyoyao.
the class MemoryCleanActivity method applyKitKatTranslucency.
/**
* Apply KitKat specific translucency.
*/
private void applyKitKatTranslucency() {
// KitKat translucent navigation/status bar.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setTranslucentStatus(true);
SystemBarTintManager mTintManager = new SystemBarTintManager(this);
mTintManager.setStatusBarTintEnabled(true);
mTintManager.setNavigationBarTintEnabled(true);
// mTintManager.setTintColor(0xF00099CC);
mTintManager.setTintDrawable(UIElementsHelper.getGeneralActionBarBackground(this));
getActionBar().setBackgroundDrawable(UIElementsHelper.getGeneralActionBarBackground(this));
}
}
use of com.yzy.supercleanmaster.utils.SystemBarTintManager in project superCleanMaster by joyoyao.
the class RubbishCleanActivity method applyKitKatTranslucency.
/**
* Apply KitKat specific translucency.
*/
private void applyKitKatTranslucency() {
// KitKat translucent navigation/status bar.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setTranslucentStatus(true);
SystemBarTintManager mTintManager = new SystemBarTintManager(this);
mTintManager.setStatusBarTintEnabled(true);
mTintManager.setNavigationBarTintEnabled(true);
// mTintManager.setTintColor(0xF00099CC);
mTintManager.setTintDrawable(UIElementsHelper.getGeneralActionBarBackground(this));
getActionBar().setBackgroundDrawable(UIElementsHelper.getGeneralActionBarBackground(this));
}
}
use of com.yzy.supercleanmaster.utils.SystemBarTintManager in project superCleanMaster by joyoyao.
the class ShortCutActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_short_cut);
rect = getIntent().getSourceBounds();
if (rect == null) {
finish();
return;
}
if (rect != null) {
Class<?> c = null;
Object obj = null;
Field field = null;
int x = 0, statusBarHeight = 0;
try {
c = Class.forName("com.android.internal.R$dimen");
obj = c.newInstance();
field = c.getField("status_bar_height");
x = Integer.parseInt(field.get(obj).toString());
statusBarHeight = getResources().getDimensionPixelSize(x);
} catch (Exception e1) {
e1.printStackTrace();
}
layoutAnim.measure(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
int height = layoutAnim.getMeasuredHeight();
int width = layoutAnim.getMeasuredWidth();
RelativeLayout.LayoutParams layoutparams = (RelativeLayout.LayoutParams) layoutAnim.getLayoutParams();
layoutparams.leftMargin = rect.left + rect.width() / 2 - width / 2;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setTranslucentStatus(true);
SystemBarTintManager tintManager = new SystemBarTintManager(this);
tintManager.setStatusBarTintEnabled(true);
tintManager.setStatusBarTintResource(R.color.transparent);
layoutparams.topMargin = rect.top + rect.height() / 2 - height / 2;
} else {
layoutparams.topMargin = rect.top + rect.height() / 2 - height / 2 - statusBarHeight;
}
mRelativeLayout.updateViewLayout(layoutAnim, layoutparams);
}
cleanLightImg.startAnimation(AnimationUtils.loadAnimation(this, R.anim.rotate_anim));
bindService(new Intent(mContext, CoreService.class), mServiceConnection, Context.BIND_AUTO_CREATE);
}
use of com.yzy.supercleanmaster.utils.SystemBarTintManager in project superCleanMaster by joyoyao.
the class SoftwareManageActivity method applyKitKatTranslucency.
/**
* Apply KitKat specific translucency.
*/
private void applyKitKatTranslucency() {
// KitKat translucent navigation/status bar.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
setTranslucentStatus(true);
SystemBarTintManager mTintManager = new SystemBarTintManager(this);
mTintManager.setStatusBarTintEnabled(true);
mTintManager.setNavigationBarTintEnabled(true);
// mTintManager.setTintColor(0xF00099CC);
mTintManager.setTintDrawable(UIElementsHelper.getGeneralActionBarBackground(this));
getActionBar().setBackgroundDrawable(UIElementsHelper.getGeneralActionBarBackground(this));
}
}
Aggregations