summaryrefslogtreecommitdiffstats
path: root/res/values
diff options
context:
space:
mode:
authoremancebo <emancebo@cyngn.com>2015-01-02 16:53:53 -0800
committerRohit Yengisetty <rohit@cyngn.com>2015-11-16 17:00:45 -0800
commitd5b621e0910d21f6753cf90a9c9c8ee6964d6c46 (patch)
tree9a95e161b24bcf6125cc56dec03f8855e0ed4d5f /res/values
parent50f9fc3c585ccc1e686d89a55a4f8c980e73843f (diff)
downloadandroid_packages_apps_PhoneCommon-d5b621e0910d21f6753cf90a9c9c8ee6964d6c46.tar.gz
android_packages_apps_PhoneCommon-d5b621e0910d21f6753cf90a9c9c8ee6964d6c46.tar.bz2
android_packages_apps_PhoneCommon-d5b621e0910d21f6753cf90a9c9c8ee6964d6c46.zip
Refactor dialpad layout to support t9 search in multiple languages
* Moves t9 labels to the side in portrait mode to make room for secondary labels * Adds resources for alternate language t9 labels Change-Id: Ie9b12afc6b1b74cc9dea48f10ab663e16b06501b
Diffstat (limited to 'res/values')
-rw-r--r--res/values/cm_dimens.xml21
-rw-r--r--res/values/cm_extra.xml34
-rw-r--r--res/values/dimens.xml1
-rw-r--r--res/values/styles.xml46
4 files changed, 85 insertions, 17 deletions
diff --git a/res/values/cm_dimens.xml b/res/values/cm_dimens.xml
new file mode 100644
index 0000000..eec63b9
--- /dev/null
+++ b/res/values/cm_dimens.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013 The CyanogenMod 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.
+-->
+<resources>
+ <dimen name="dialpad_key_letters_small_size">10sp</dimen>
+ <dimen name="dialpad_key_margin_right">9dp</dimen>
+ <dimen name="dialpad_key_number_left_margin">26dp</dimen>
+</resources> \ No newline at end of file
diff --git a/res/values/cm_extra.xml b/res/values/cm_extra.xml
new file mode 100644
index 0000000..3c4adf8
--- /dev/null
+++ b/res/values/cm_extra.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ Copyright (C) 2013-2014 The CyanogenMod 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.
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Localized dialer buttons.
+ In English, we don't need a secondary row, so all values are empty.
+ Change these values depending on your language requirements.
+ -->
+ <string name="dialpad_0_2_letters" translatable="false"></string>
+ <string name="dialpad_1_2_letters" translatable="false"></string>
+ <string name="dialpad_2_2_letters"></string>
+ <string name="dialpad_3_2_letters"></string>
+ <string name="dialpad_4_2_letters"></string>
+ <string name="dialpad_5_2_letters"></string>
+ <string name="dialpad_6_2_letters"></string>
+ <string name="dialpad_7_2_letters"></string>
+ <string name="dialpad_8_2_letters"></string>
+ <string name="dialpad_9_2_letters"></string>
+ <string name="dialpad_star_2_letters" translatable="false"></string>
+ <string name="dialpad_pound_2_letters" translatable="false"></string>
+</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 0c342ba..86b96ef 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -27,7 +27,6 @@
<!-- Zero key should have less space between self and text because "+" is smaller -->
<dimen name="dialpad_zero_key_number_margin_bottom">@dimen/dialpad_zero_key_number_default_margin_bottom</dimen>
<dimen name="dialpad_zero_key_number_default_margin_bottom">1dp</dimen>
- <dimen name="dialpad_symbol_margin_bottom">13dp</dimen>
<!-- The bottom row of the dialpad is slightly taller to account for the dial button -->
<dimen name="dialpad_bottom_key_height">65dp</dimen>
<dimen name="dialpad_key_plus_size">18sp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index b563705..1a00cd1 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -27,34 +27,28 @@
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:layout_marginBottom">@dimen/dialpad_key_number_margin_bottom</item>
+ <item name="android:layout_marginRight">@dimen/dialpad_key_margin_right</item>
<item name="android:gravity">center</item>
+ <item name="android:layout_gravity">center_vertical</item>
</style>
- <style name="DialpadBottomKeyNumberStyle" parent="DialpadKeyNumberStyle">
- <item name="android:layout_marginBottom">@dimen/dialpad_zero_key_number_margin_bottom</item>
- </style>
+ <style name="DialpadBottomKeyNumberStyle" parent="DialpadKeyNumberStyle"/>
- <style name="DialpadKeyStarStyle">
- <item name="android:textColor">?attr/dialpad_text_color_secondary</item>
- <item name="android:textSize">@dimen/dialpad_key_star_size</item>
+ <style name="DialpadKeySpecialCharStyle">
+ <item name="android:textColor">@color/dialpad_secondary_text_color</item>
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:alpha">0.8</item>
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
- <item name="android:layout_marginBottom">@dimen/dialpad_symbol_margin_bottom</item>
<item name="android:gravity">center</item>
</style>
- <style name="DialpadKeyPoundStyle">
- <item name="android:textColor">?attr/dialpad_text_color_secondary</item>
+ <style name="DialpadKeyPoundStyle" parent="DialpadKeySpecialCharStyle">
<item name="android:textSize">@dimen/dialpad_key_pound_size</item>
- <item name="android:fontFamily">sans-serif-light</item>
- <item name="android:alpha">0.8</item>
- <item name="android:layout_width">wrap_content</item>
- <item name="android:layout_height">wrap_content</item>
- <item name="android:layout_marginBottom">@dimen/dialpad_symbol_margin_bottom</item>
- <item name="android:gravity">center</item>
+ </style>
+
+ <style name="DialpadKeyStarStyle" parent="DialpadKeySpecialCharStyle">
+ <item name="android:textSize">@dimen/dialpad_key_star_size</item>
</style>
<style name="DialpadKeyLettersStyle">
@@ -66,6 +60,11 @@
<item name="android:gravity">center_horizontal</item>
</style>
+ <style name="DialpadKeyPlusStyle" parent="DialpadKeyLettersStyle">
+ <item name="android:textSize">@dimen/dialpad_key_plus_size</item>
+ <item name="android:fontFamily">sans-serif-light</item>
+ </style>
+
<style name="DialpadKeyButtonStyle">
<item name="android:soundEffectsEnabled">false</item>
<item name="android:clickable">true</item>
@@ -84,9 +83,24 @@
<style name="DialpadKeyInternalLayoutStyle">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
+ <item name="android:layout_gravity">center_vertical</item>
+ <item name="android:gravity">center</item>
+ <item name="android:layout_marginLeft">@dimen/dialpad_key_number_left_margin</item>
+ <item name="android:orientation">horizontal</item>
+ </style>
+
+ <style name="SpecialCharInternalLayoutStyle">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
<item name="android:layout_gravity">center</item>
<item name="android:gravity">center</item>
+ </style>
+
+ <style name="DialpadKeyLetterLayoutStyle">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">wrap_content</item>
<item name="android:orientation">vertical</item>
+ <item name="android:layout_gravity">center_vertical</item>
</style>
<style name="Dialpad_Light">