Make status bar become 80% of white in homepage.
Test: visual Change-Id: I005b49306e4c397d9f1fc5062da721709f303a1d Fixes: 116346521
This commit is contained in:
@@ -1,6 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<issues format="4">
|
<issues format="4">
|
||||||
|
|
||||||
|
<issue
|
||||||
|
id="LintError"
|
||||||
|
severity="Error"
|
||||||
|
message="No `.class` files were found in project ".", so none of the classfile based checks could be run. Does the project need to be built first?"
|
||||||
|
category="Lint"
|
||||||
|
priority="10"
|
||||||
|
summary="Lint Failure"
|
||||||
|
explanation="This issue type represents a problem running lint itself. Examples include failure to find bytecode for source files (which means certain detectors could not be run), parsing errors in lint configuration files, etc.
These errors are not errors in your own code, but they are shown to make it clear that some checks were not completed.">
|
||||||
|
<location
|
||||||
|
file="."/>
|
||||||
|
</issue>
|
||||||
|
|
||||||
<issue
|
<issue
|
||||||
id="HardCodedColor"
|
id="HardCodedColor"
|
||||||
severity="Error"
|
severity="Error"
|
||||||
@@ -225,6 +237,22 @@
|
|||||||
column="5"/>
|
column="5"/>
|
||||||
</issue>
|
</issue>
|
||||||
|
|
||||||
|
<issue
|
||||||
|
id="HardCodedColor"
|
||||||
|
severity="Error"
|
||||||
|
message="Avoid using hardcoded color"
|
||||||
|
category="Correctness"
|
||||||
|
priority="4"
|
||||||
|
summary="Using hardcoded color"
|
||||||
|
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||||
|
errorLine1=" <color name="homepage_status_bar_color">#cc000000</color>"
|
||||||
|
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||||
|
<location
|
||||||
|
file="res/values-night/colors.xml"
|
||||||
|
line="25"
|
||||||
|
column="3"/>
|
||||||
|
</issue>
|
||||||
|
|
||||||
<issue
|
<issue
|
||||||
id="HardCodedColor"
|
id="HardCodedColor"
|
||||||
severity="Error"
|
severity="Error"
|
||||||
@@ -1281,6 +1309,22 @@
|
|||||||
column="5"/>
|
column="5"/>
|
||||||
</issue>
|
</issue>
|
||||||
|
|
||||||
|
<issue
|
||||||
|
id="HardCodedColor"
|
||||||
|
severity="Error"
|
||||||
|
message="Avoid using hardcoded color"
|
||||||
|
category="Correctness"
|
||||||
|
priority="4"
|
||||||
|
summary="Using hardcoded color"
|
||||||
|
explanation="Hardcoded color values are bad because theme changes cannot be uniformly applied.Instead use the theme specific colors such as `?android:attr/textColorPrimary` in attributes.
This ensures that a theme change from a light to a dark theme can be uniformlyapplied across the app."
|
||||||
|
errorLine1=" <color name="homepage_status_bar_color">#ccFFFFFF</color>"
|
||||||
|
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||||
|
<location
|
||||||
|
file="res/values/colors.xml"
|
||||||
|
line="133"
|
||||||
|
column="5"/>
|
||||||
|
</issue>
|
||||||
|
|
||||||
<issue
|
<issue
|
||||||
id="HardCodedColor"
|
id="HardCodedColor"
|
||||||
severity="Error"
|
severity="Error"
|
||||||
@@ -1293,7 +1337,7 @@
|
|||||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||||
<location
|
<location
|
||||||
file="res/values/colors.xml"
|
file="res/values/colors.xml"
|
||||||
line="133"
|
line="136"
|
||||||
column="5"/>
|
column="5"/>
|
||||||
</issue>
|
</issue>
|
||||||
|
|
||||||
@@ -1309,7 +1353,7 @@
|
|||||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||||
<location
|
<location
|
||||||
file="res/values/colors.xml"
|
file="res/values/colors.xml"
|
||||||
line="134"
|
line="137"
|
||||||
column="5"/>
|
column="5"/>
|
||||||
</issue>
|
</issue>
|
||||||
|
|
||||||
@@ -1325,7 +1369,7 @@
|
|||||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||||
<location
|
<location
|
||||||
file="res/values/colors.xml"
|
file="res/values/colors.xml"
|
||||||
line="135"
|
line="138"
|
||||||
column="5"/>
|
column="5"/>
|
||||||
</issue>
|
</issue>
|
||||||
|
|
||||||
@@ -2477,7 +2521,7 @@
|
|||||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
errorLine2=" ~~~~~~~~~~~~~~~~~~~">
|
||||||
<location
|
<location
|
||||||
file="res/values/strings.xml"
|
file="res/values/strings.xml"
|
||||||
line="5883"
|
line="5885"
|
||||||
column="36"/>
|
column="36"/>
|
||||||
</issue>
|
</issue>
|
||||||
|
|
||||||
@@ -2509,7 +2553,7 @@
|
|||||||
errorLine2=" ^">
|
errorLine2=" ^">
|
||||||
<location
|
<location
|
||||||
file="res/values/styles.xml"
|
file="res/values/styles.xml"
|
||||||
line="415"
|
line="388"
|
||||||
column="44"/>
|
column="44"/>
|
||||||
</issue>
|
</issue>
|
||||||
|
|
||||||
@@ -2525,7 +2569,7 @@
|
|||||||
errorLine2=" ^">
|
errorLine2=" ^">
|
||||||
<location
|
<location
|
||||||
file="res/values/styles.xml"
|
file="res/values/styles.xml"
|
||||||
line="421"
|
line="394"
|
||||||
column="44"/>
|
column="44"/>
|
||||||
</issue>
|
</issue>
|
||||||
|
|
||||||
@@ -2541,7 +2585,7 @@
|
|||||||
errorLine2=" ^">
|
errorLine2=" ^">
|
||||||
<location
|
<location
|
||||||
file="res/values/styles.xml"
|
file="res/values/styles.xml"
|
||||||
line="422"
|
line="395"
|
||||||
column="44"/>
|
column="44"/>
|
||||||
</issue>
|
</issue>
|
||||||
|
|
||||||
@@ -2557,7 +2601,7 @@
|
|||||||
errorLine2=" ^">
|
errorLine2=" ^">
|
||||||
<location
|
<location
|
||||||
file="res/values/styles.xml"
|
file="res/values/styles.xml"
|
||||||
line="457"
|
line="430"
|
||||||
column="34"/>
|
column="34"/>
|
||||||
</issue>
|
</issue>
|
||||||
|
|
||||||
|
@@ -21,5 +21,7 @@
|
|||||||
<color name="switchbar_switch_thumb_tint">@android:color/black</color>
|
<color name="switchbar_switch_thumb_tint">@android:color/black</color>
|
||||||
<color name="homepage_accessibility_background">#783BE5</color>
|
<color name="homepage_accessibility_background">#783BE5</color>
|
||||||
<color name="homepage_support_background">#3F5FBD</color>
|
<color name="homepage_support_background">#3F5FBD</color>
|
||||||
|
<!-- 80% black for status bar of homepage -->
|
||||||
|
<color name="homepage_status_bar_color">#cc000000</color>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
||||||
|
@@ -129,6 +129,9 @@
|
|||||||
<!-- launcher icon color -->
|
<!-- launcher icon color -->
|
||||||
<color name="icon_launcher_setting_color">@*android:color/accent_device_default_light</color>
|
<color name="icon_launcher_setting_color">@*android:color/accent_device_default_light</color>
|
||||||
|
|
||||||
|
<!-- 80% white for status bar of homepage -->
|
||||||
|
<color name="homepage_status_bar_color">#ccFFFFFF</color>
|
||||||
|
|
||||||
<!-- QR code scanner colors -->
|
<!-- QR code scanner colors -->
|
||||||
<color name="qr_corner_line_color">#ffdadce0</color>
|
<color name="qr_corner_line_color">#ffdadce0</color>
|
||||||
<color name="qr_focused_corner_line_color">#ff1a73e8</color>
|
<color name="qr_focused_corner_line_color">#ff1a73e8</color>
|
||||||
|
@@ -19,6 +19,7 @@ package com.android.settings.homepage;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.FeatureFlagUtils;
|
import android.util.FeatureFlagUtils;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.Toolbar;
|
import android.widget.Toolbar;
|
||||||
|
|
||||||
@@ -47,6 +48,7 @@ public class SettingsHomepageActivity extends SettingsBaseActivity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateWindowProperties();
|
||||||
setContentView(R.layout.settings_homepage_container);
|
setContentView(R.layout.settings_homepage_container);
|
||||||
|
|
||||||
final Toolbar toolbar = findViewById(R.id.search_action_bar);
|
final Toolbar toolbar = findViewById(R.id.search_action_bar);
|
||||||
@@ -73,4 +75,15 @@ public class SettingsHomepageActivity extends SettingsBaseActivity {
|
|||||||
}
|
}
|
||||||
fragmentTransaction.commit();
|
fragmentTransaction.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateWindowProperties() {
|
||||||
|
final View decorView = getWindow().getDecorView();
|
||||||
|
decorView.setSystemUiVisibility(
|
||||||
|
decorView.getSystemUiVisibility() |
|
||||||
|
View.SYSTEM_UI_FLAG_LAYOUT_STABLE |
|
||||||
|
View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||||
|
);
|
||||||
|
|
||||||
|
getWindow().setStatusBarColor(getResources().getColor(R.color.homepage_status_bar_color));
|
||||||
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user