Messaging: Good news: we can tint the status bar properly!
* 80% opacity is not what we want anymore * The status bar in the conversation list is also supposed to be tinted properly - so why not do it? Change-Id: I03c05595cd7f5a3f8f7dea120e14f3f3e0fff0b5
This commit is contained in:
@@ -72,6 +72,9 @@ public class BugleActionBarActivity extends AppCompatActivity implements ImeUtil
|
||||
if (LogUtil.isLoggable(LogUtil.BUGLE_TAG, LogUtil.VERBOSE)) {
|
||||
LogUtil.v(LogUtil.BUGLE_TAG, this.getLocalClassName() + ".onCreate");
|
||||
}
|
||||
|
||||
getWindow().setStatusBarColor(getResources().getColor(R.color.action_bar_background_color,
|
||||
getTheme()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -249,14 +249,7 @@ public class UiUtils {
|
||||
}
|
||||
|
||||
public static void setStatusBarColor(final Activity activity, final int color) {
|
||||
// To achieve the appearance of an 80% opacity blend against a black background,
|
||||
// each color channel is reduced in value by 20%.
|
||||
final int blendedRed = (int) Math.floor(0.8 * Color.red(color));
|
||||
final int blendedGreen = (int) Math.floor(0.8 * Color.green(color));
|
||||
final int blendedBlue = (int) Math.floor(0.8 * Color.blue(color));
|
||||
|
||||
activity.getWindow().setStatusBarColor(
|
||||
Color.rgb(blendedRed, blendedGreen, blendedBlue));
|
||||
activity.getWindow().setStatusBarColor(color);
|
||||
}
|
||||
|
||||
public static boolean isRtlMode() {
|
||||
|
||||
Reference in New Issue
Block a user