LatinIME: Style action popup buttons
The lxx theme variants style the action button popup with png graphics.
Create our own for Material You, so we don't need to change the entire
MoreKeys code.
Change-Id: Ia1b01142d85cc5d8a3ea329822a2c61b4443b797
diff --git a/java/res/drawable/btn_keyboard_key_active_normal_you.xml b/java/res/drawable/btn_keyboard_key_active_normal_you.xml
new file mode 100644
index 0000000..da31710
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key_active_normal_you.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ SPDX-FileCopyrightText: 2023 The LineageOS Project
+ SPDX-License-Identifier: Apache-2.0
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <solid android:color="@color/keyboard_key_normal_color_you"/>
+ <corners android:radius="@dimen/keyboard_key_action_corner_radius_you" />
+ <size
+ android:width="@dimen/keyboard_key_popup_action_size"
+ android:height="@dimen/keyboard_key_popup_action_size"/>
+</shape>
diff --git a/java/res/drawable/btn_keyboard_key_active_pressed_you.xml b/java/res/drawable/btn_keyboard_key_active_pressed_you.xml
new file mode 100644
index 0000000..bfcc0c7
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key_active_pressed_you.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ SPDX-FileCopyrightText: 2023 The LineageOS Project
+ SPDX-License-Identifier: Apache-2.0
+-->
+<shape xmlns:android="http://schemas.android.com/apk/res/android">
+ <solid android:color="@color/keyboard_key_pressed_color_you"/>
+ <corners android:radius="@dimen/keyboard_key_action_corner_radius_you" />
+ <size
+ android:width="@dimen/keyboard_key_popup_action_size"
+ android:height="@dimen/keyboard_key_popup_action_size"/>
+</shape>
diff --git a/java/res/drawable/btn_keyboard_key_popup_action_you.xml b/java/res/drawable/btn_keyboard_key_popup_action_you.xml
new file mode 100644
index 0000000..524a74f
--- /dev/null
+++ b/java/res/drawable/btn_keyboard_key_popup_action_you.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ SPDX-FileCopyrightText: 2023 The LineageOS Project
+ SPDX-License-Identifier: Apache-2.0
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true"
+ android:drawable="@drawable/btn_keyboard_key_active_pressed_you" />
+ <item android:drawable="@drawable/btn_keyboard_key_active_normal_you" />
+</selector>
diff --git a/java/res/values/themes-you-dimens.xml b/java/res/values/themes-you-dimens.xml
index f8ec38b..2cd1134 100644
--- a/java/res/values/themes-you-dimens.xml
+++ b/java/res/values/themes-you-dimens.xml
@@ -2,5 +2,6 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<dimen name="keyboard_key_corner_radius_you">8dp</dimen>
<dimen name="keyboard_key_action_corner_radius_you">120dp</dimen>
+ <dimen name="keyboard_key_popup_action_size">40dp</dimen>
<dimen name="config_gesture_floating_preview_round_radius_you">8dp</dimen>
</resources>
diff --git a/java/res/values/themes-you.xml b/java/res/values/themes-you.xml
index f9fe3b4..bb9d44c 100644
--- a/java/res/values/themes-you.xml
+++ b/java/res/values/themes-you.xml
@@ -155,7 +155,7 @@
parent="MoreKeysKeyboardView.You"
>
<item name="android:background">@android:color/transparent</item>
- <item name="keyBackground">@drawable/btn_keyboard_key_popup_action_lxx_dark</item>
+ <item name="keyBackground">@drawable/btn_keyboard_key_popup_action_you</item>
<item name="divider">@null</item>
<item name="keyLabelFlags">keepBackgroundAspectRatio</item>
</style>