Update Shortcut Help buttons
- Correct colours to UX spec
- Update margins/button size to match design spec
- Arrow pointer instead of hand
Bug: 286538767
Test: Inspection
Flag: NA
Change-Id: If2b06b7e1c52aafbcc3db9bd6c1da51521535e1f
diff --git a/packages/SystemUI/res/drawable/shortcut_button_colored.xml b/packages/SystemUI/res/drawable/shortcut_button_colored.xml
index a21489c..bf90853 100644
--- a/packages/SystemUI/res/drawable/shortcut_button_colored.xml
+++ b/packages/SystemUI/res/drawable/shortcut_button_colored.xml
@@ -22,8 +22,8 @@
<item>
<shape android:shape="rectangle">
<corners android:radius="16dp"/>
- <solid android:color="?androidprv:attr/colorSurface"/>
+ <solid android:color="?androidprv:attr/materialColorSurfaceBright"/>
</shape>
</item>
</ripple>
-</inset>
\ No newline at end of file
+</inset>
diff --git a/packages/SystemUI/res/drawable/shortcut_button_focus_colored.xml b/packages/SystemUI/res/drawable/shortcut_button_focus_colored.xml
index 2ff32b6..f692ed97 100644
--- a/packages/SystemUI/res/drawable/shortcut_button_focus_colored.xml
+++ b/packages/SystemUI/res/drawable/shortcut_button_focus_colored.xml
@@ -22,8 +22,8 @@
<item>
<shape android:shape="rectangle">
<corners android:radius="16dp"/>
- <solid android:color="?androidprv:attr/colorAccentPrimary"/>
+ <solid android:color="?androidprv:attr/materialColorPrimary"/>
</shape>
</item>
</ripple>
-</inset>
\ No newline at end of file
+</inset>
diff --git a/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml b/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml
index 17f0eff..dbcd263 100644
--- a/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml
+++ b/packages/SystemUI/res/layout/keyboard_shortcuts_search_view.xml
@@ -85,15 +85,13 @@
android:id="@+id/shortcut_system"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="12dp"
style="@style/ShortCutButton"
- android:text="@string/keyboard_shortcut_search_category_system"/>
+ android:text="@string/keyboard_shortcut_search_category_system" />
<Button
android:id="@+id/shortcut_input"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="12dp"
style="@style/ShortCutButton"
android:text="@string/keyboard_shortcut_search_category_input"/>
@@ -101,7 +99,6 @@
android:id="@+id/shortcut_open_apps"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="12dp"
style="@style/ShortCutButton"
android:text="@string/keyboard_shortcut_search_category_open_apps"/>
@@ -109,7 +106,6 @@
android:id="@+id/shortcut_specific_app"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="12dp"
style="@style/ShortCutButton"
android:text="@string/keyboard_shortcut_search_category_current_app"/>
</LinearLayout>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 7ce530f..d593c4b 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -1491,10 +1491,14 @@
<style name="ShortCutButton" parent="@android:style/Widget.Material.Button">
<item name="android:background">@drawable/shortcut_button_colored</item>
- <item name="android:stateListAnimator">@null</item>
<item name="android:textSize">16sp</item>
- <item name="android:padding">4dp</item>
- <item name="android:textColor">?androidprv:attr/textColorSecondary</item>
+ <item name="android:textColor">?androidprv:attr/materialColorOnSurface</item>
+ <item name="android:layout_marginEnd">12dp</item>
+ <item name="android:paddingLeft">24dp</item>
+ <item name="android:paddingRight">24dp</item>
+ <item name="android:minHeight">40dp</item>
+ <item name="android:stateListAnimator">@*android:anim/flat_button_state_list_anim_material</item>
+ <item name="android:pointerIcon">arrow</item>
</style>
<style name="ShortcutHorizontalDivider">
@@ -1530,4 +1534,4 @@
<style name="Theme.PrivacyDialog" parent="@style/Theme.SystemUI.Dialog">
<item name="android:colorBackground">?androidprv:attr/materialColorSurfaceContainer</item>
</style>
-</resources>
\ No newline at end of file
+</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java
index 964263d..4a50897 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcutListSearch.java
@@ -1277,12 +1277,12 @@
private int getColorOfTextColorOnAccent() {
return Utils.getColorAttrDefaultColor(
- mContext, com.android.internal.R.attr.textColorOnAccent);
+ mContext, com.android.internal.R.attr.materialColorOnPrimary);
}
private int getColorOfTextColorSecondary() {
return Utils.getColorAttrDefaultColor(
- mContext, com.android.internal.R.attr.textColorSecondary);
+ mContext, com.android.internal.R.attr.materialColorOnSurface);
}
// Create the new data structure for handling the N-to-1 key mapping and other complex case.