Use material color res from settingslib for battery tips card

Settings Anomaly Card
[Before-Dark] 	https://screenshot.googleplex.com/5PZC6mbWjqunvuv
[Before-Light] 	https://screenshot.googleplex.com/7eoF6yLX6t3JeHz
[After-Dark]  	https://screenshot.googleplex.com/5j4mQFDXjkVcxHs
[After-Light] 	https://screenshot.googleplex.com/5ySzfzft9293GXb

App Anomaly Card
[Before-Dark] 	https://screenshot.googleplex.com/JKkcqCiAKxkPZds
[Before-Light] 	https://screenshot.googleplex.com/ASB4CnDhPjsQohH
[After-Dark]  	https://screenshot.googleplex.com/5y3LVvng54vndi9
[After-Light] 	https://screenshot.googleplex.com/NCJeuViCtDcNhiV

Bug: 339130556
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Change-Id: I29d68713c14068fd9961082a148dd02ad38289a6
This commit is contained in:
mxyyiyi
2024-05-07 13:25:36 +08:00
parent 4d725d7715
commit 03fdbbe504
7 changed files with 7 additions and 10 deletions

View File

@@ -14,5 +14,5 @@
limitations under the License. limitations under the License.
--> -->
<selector xmlns:android="http://schemas.android.com/apk/res/android"> <selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="?android:attr/colorAccent"/> <item android:color="@color/settingslib_materialColorPrimary"/>
</selector> </selector>

View File

@@ -16,8 +16,7 @@
--> -->
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
android:shape="rectangle"> android:shape="rectangle">
<solid android:color="?androidprv:attr/materialColorPrimaryContainer" /> <solid android:color="@color/settingslib_materialColorPrimaryContainer" />
<corners android:radius="@dimen/battery_hints_chip_corner_radius" /> <corners android:radius="@dimen/battery_hints_chip_corner_radius" />
</shape> </shape>

View File

@@ -17,6 +17,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android" <shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle"> android:shape="rectangle">
<solid android:color="@color/settingslib_dialog_background" /> <solid android:color="@color/settingslib_materialColorSurfaceBright" />
<corners android:radius="@dimen/battery_tips_card_corner_radius_normal" /> <corners android:radius="@dimen/battery_tips_card_corner_radius_normal" />
</shape> </shape>

View File

@@ -25,7 +25,7 @@
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.Material3.TitleMedium" android:textAppearance="@style/TextAppearance.Material3.TitleMedium"
android:textColor="?android:attr/textColorPrimary" /> android:textColor="@color/settingslib_materialColorOnSurface" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@@ -55,7 +55,7 @@
android:paddingHorizontal="16dp" android:paddingHorizontal="16dp"
android:text="@string/battery_tips_card_action_button" android:text="@string/battery_tips_card_action_button"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2" android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2"
android:textColor="@color/power_anomaly_primary_button_text_color" android:textColor="@color/settingslib_materialColorOnPrimary"
app:backgroundTint="@color/color_accent_selector" /> app:backgroundTint="@color/color_accent_selector" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@@ -38,6 +38,6 @@
android:paddingHorizontal="8dp" android:paddingHorizontal="8dp"
android:textAlignment="viewStart" android:textAlignment="viewStart"
android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2" android:textAppearance="@style/TextAppearance.MaterialComponents.Subtitle2"
android:textColor="?androidprv:attr/materialColorOnSurface"/> android:textColor="@color/settingslib_materialColorOnSurface"/>
</LinearLayout> </LinearLayout>

View File

@@ -58,7 +58,6 @@
<!-- Power anomaly color for icons, button and text --> <!-- Power anomaly color for icons, button and text -->
<color name="power_anomaly_app_warning_hint_color">#FDD663</color> <color name="power_anomaly_app_warning_hint_color">#FDD663</color>
<color name="power_anomaly_primary_button_text_color">#2E3300</color>
<!-- UDFPS colors --> <!-- UDFPS colors -->
<color name="udfps_enroll_icon">#7DA7F1</color> <color name="udfps_enroll_icon">#7DA7F1</color>

View File

@@ -171,9 +171,8 @@
<!-- Icon tint color for battery usage system icon --> <!-- Icon tint color for battery usage system icon -->
<color name="battery_usage_system_icon_color">?android:attr/textColorPrimary</color> <color name="battery_usage_system_icon_color">?android:attr/textColorPrimary</color>
<!-- Power anomaly color for icons, button and text --> <!-- Power anomaly color for icons, button -->
<color name="power_anomaly_app_warning_hint_color">#D56E0C</color> <color name="power_anomaly_app_warning_hint_color">#D56E0C</color>
<color name="power_anomaly_primary_button_text_color">#FFFFFF</color>
<!-- UDFPS colors --> <!-- UDFPS colors -->
<color name="udfps_enroll_icon">#699FF3</color> <color name="udfps_enroll_icon">#699FF3</color>