aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
Diffstat (limited to 'java')
-rw-r--r--java/res/layout/key_preview.xml (renamed from java/res/layout/key_preview_ics.xml)2
-rw-r--r--java/res/layout/key_preview_gb.xml27
-rw-r--r--java/res/layout/key_preview_klp.xml27
-rw-r--r--java/res/values/attrs.xml2
-rw-r--r--java/res/values/themes-common.xml4
-rw-r--r--java/res/values/themes-gb.xml8
-rw-r--r--java/res/values/themes-ics.xml8
-rw-r--r--java/res/values/themes-klp.xml8
8 files changed, 27 insertions, 59 deletions
diff --git a/java/res/layout/key_preview_ics.xml b/java/res/layout/key_preview.xml
index 33b6947ef..16d4c72c3 100644
--- a/java/res/layout/key_preview_ics.xml
+++ b/java/res/layout/key_preview.xml
@@ -21,7 +21,7 @@
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:background="@drawable/keyboard_key_feedback_ics"
android:minWidth="32dp"
android:gravity="center"
+ style="?attr/keyPreviewTextViewStyle"
/>
diff --git a/java/res/layout/key_preview_gb.xml b/java/res/layout/key_preview_gb.xml
deleted file mode 100644
index 2f2a321a3..000000000
--- a/java/res/layout/key_preview_gb.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2010, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/keyboard_key_feedback_gb"
- android:minWidth="32dp"
- android:gravity="center"
-/>
diff --git a/java/res/layout/key_preview_klp.xml b/java/res/layout/key_preview_klp.xml
deleted file mode 100644
index 160aeb9a9..000000000
--- a/java/res/layout/key_preview_klp.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<TextView xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:background="@drawable/keyboard_key_feedback_klp"
- android:minWidth="32dp"
- android:gravity="center"
-/>
diff --git a/java/res/values/attrs.xml b/java/res/values/attrs.xml
index 02e36fe97..e8e139da3 100644
--- a/java/res/values/attrs.xml
+++ b/java/res/values/attrs.xml
@@ -26,6 +26,8 @@
<attr name="keyboardViewStyle" format="reference" />
<!-- MainKeyboardView style -->
<attr name="mainKeyboardViewStyle" format="reference" />
+ <!-- Key preview text view style -->
+ <attr name="keyPreviewTextViewStyle" format="reference"/>
<!-- EmojiPalettesView style -->
<attr name="emojiPalettesViewStyle" format="reference" />
<!-- MoreKeysKeyboard style -->
diff --git a/java/res/values/themes-common.xml b/java/res/values/themes-common.xml
index 774c01ca5..64e8c87b4 100644
--- a/java/res/values/themes-common.xml
+++ b/java/res/values/themes-common.xml
@@ -75,6 +75,7 @@
<item name="keyRepeatInterval">@integer/config_key_repeat_interval</item>
<item name="longPressShiftLockTimeout">@integer/config_longpress_shift_lock_timeout</item>
<item name="ignoreAltCodeKeyTimeout">@integer/config_ignore_alt_code_key_timeout</item>
+ <item name="keyPreviewLayout">@layout/key_preview</item>
<item name="keyPreviewHeight">@dimen/key_preview_height</item>
<item name="keyPreviewLingerTimeout">@integer/config_key_preview_linger_timeout</item>
<item name="moreKeysKeyboardLayout">@layout/more_keys_keyboard</item>
@@ -104,6 +105,7 @@
<style
name="MainKeyboardView"
parent="KeyboardView" />
+ <style name="KeyPreviewTextView" />
<!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
for instance delete button, need themed {@link KeyboardView} attributes. -->
<style
@@ -128,4 +130,4 @@
<item name="android:windowEnterAnimation">@anim/more_keys_keyboard_fadein</item>
<item name="android:windowExitAnimation">@anim/more_keys_keyboard_fadeout</item>
</style>
-</resources> \ No newline at end of file
+</resources>
diff --git a/java/res/values/themes-gb.xml b/java/res/values/themes-gb.xml
index 2932143cd..34075e70a 100644
--- a/java/res/values/themes-gb.xml
+++ b/java/res/values/themes-gb.xml
@@ -23,6 +23,7 @@
<item name="keyboardStyle">@style/Keyboard.GB</item>
<item name="keyboardViewStyle">@style/KeyboardView.GB</item>
<item name="mainKeyboardViewStyle">@style/MainKeyboardView.GB</item>
+ <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.GB</item>
<item name="emojiPalettesViewStyle">@style/EmojiPalettesView.GB</item>
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.GB</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.GB</item>
@@ -84,7 +85,6 @@
name="MainKeyboardView.GB"
parent="KeyboardView.GB"
>
- <item name="keyPreviewLayout">@layout/key_preview_gb</item>
<item name="keyPreviewOffset">@dimen/key_preview_offset_gb</item>
<item name="gestureFloatingPreviewTextColor">@color/highlight_color_gb</item>
<item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_gb</item>
@@ -95,6 +95,12 @@
<item name="spacebarTextColor">@color/spacebar_text_color_gb</item>
<item name="spacebarTextShadowColor">@color/spacebar_text_shadow_color_gb</item>
</style>
+ <style
+ name="KeyPreviewTextView.GB"
+ parent="KeyPreviewTextView"
+ >
+ <item name="android:background">@drawable/keyboard_key_feedback_gb</item>
+ </style>
<!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
for instance delete button, need themed {@link KeyboardView} attributes. -->
<style
diff --git a/java/res/values/themes-ics.xml b/java/res/values/themes-ics.xml
index e854cd124..b4f5af4f1 100644
--- a/java/res/values/themes-ics.xml
+++ b/java/res/values/themes-ics.xml
@@ -23,6 +23,7 @@
<item name="keyboardStyle">@style/Keyboard.ICS</item>
<item name="keyboardViewStyle">@style/KeyboardView.ICS</item>
<item name="mainKeyboardViewStyle">@style/MainKeyboardView.ICS</item>
+ <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.ICS</item>
<item name="emojiPalettesViewStyle">@style/EmojiPalettesView.ICS</item>
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.ICS</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.ICS</item>
@@ -62,7 +63,6 @@
name="MainKeyboardView.ICS"
parent="KeyboardView.ICS"
>
- <item name="keyPreviewLayout">@layout/key_preview_ics</item>
<item name="keyPreviewOffset">@dimen/key_preview_offset_holo</item>
<item name="gestureFloatingPreviewTextColor">@color/highlight_color_ics</item>
<item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_holo</item>
@@ -73,6 +73,12 @@
<item name="spacebarTextColor">@color/spacebar_text_color_holo</item>
<item name="spacebarTextShadowColor">@color/spacebar_text_shadow_color_holo</item>
</style>
+ <style
+ name="KeyPreviewTextView.ICS"
+ parent="KeyPreviewTextView"
+ >
+ <item name="android:background">@drawable/keyboard_key_feedback_ics</item>
+ </style>
<!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
for instance delete button, need themed {@link KeyboardView} attributes. -->
<style
diff --git a/java/res/values/themes-klp.xml b/java/res/values/themes-klp.xml
index c404b6a32..ef88d8850 100644
--- a/java/res/values/themes-klp.xml
+++ b/java/res/values/themes-klp.xml
@@ -23,6 +23,7 @@
<item name="keyboardStyle">@style/Keyboard.KLP</item>
<item name="keyboardViewStyle">@style/KeyboardView.KLP</item>
<item name="mainKeyboardViewStyle">@style/MainKeyboardView.KLP</item>
+ <item name="keyPreviewTextViewStyle">@style/KeyPreviewTextView.KLP</item>
<item name="emojiPalettesViewStyle">@style/EmojiPalettesView.KLP</item>
<item name="moreKeysKeyboardStyle">@style/MoreKeysKeyboard.KLP</item>
<item name="moreKeysKeyboardViewStyle">@style/MoreKeysKeyboardView.KLP</item>
@@ -62,7 +63,6 @@
name="MainKeyboardView.KLP"
parent="KeyboardView.KLP"
>
- <item name="keyPreviewLayout">@layout/key_preview_klp</item>
<item name="keyPreviewOffset">@dimen/key_preview_offset_holo</item>
<item name="gestureFloatingPreviewTextColor">@color/highlight_color_klp</item>
<item name="gestureFloatingPreviewColor">@color/gesture_floating_preview_color_holo</item>
@@ -73,6 +73,12 @@
<item name="spacebarTextColor">@color/spacebar_text_color_holo</item>
<item name="spacebarTextShadowColor">@color/spacebar_text_shadow_color_holo</item>
</style>
+ <style
+ name="KeyPreviewTextView.KLP"
+ parent="KeyPreviewTextView"
+ >
+ <item name="android:background">@drawable/keyboard_key_feedback_klp</item>
+ </style>
<!-- Though {@link EmojiPalettesView} doesn't extend {@link KeyboardView}, some views inside it,
for instance delete button, need themed {@link KeyboardView} attributes. -->
<style