summaryrefslogtreecommitdiffstats
path: root/res/values
diff options
context:
space:
mode:
authoremancebo <emancebo@cyngn.com>2015-01-02 16:53:53 -0800
committerSteve Kondik <steve@cyngn.com>2015-03-14 23:55:06 -0700
commitf215ec4a8793cb7ce0017c152ea7112c09797a72 (patch)
tree1d78a657e07bfc61a48c74f5f6e88cc0e04e0b0c /res/values
parentbe36208a0c6fb987ccba34d3987a91ac45d939ac (diff)
downloadpackages_apps_PhoneCommon-f215ec4a8793cb7ce0017c152ea7112c09797a72.tar.gz
packages_apps_PhoneCommon-f215ec4a8793cb7ce0017c152ea7112c09797a72.tar.bz2
packages_apps_PhoneCommon-f215ec4a8793cb7ce0017c152ea7112c09797a72.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.xml44
4 files changed, 84 insertions, 16 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 c15c5bf..8f0e864 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 df649d6..620b301 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">
+ <style name="DialpadKeySpecialCharStyle">
<item name="android:textColor">@color/dialpad_secondary_text_color</item>
- <item name="android:textSize">@dimen/dialpad_key_star_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="DialpadKeyPoundStyle">
- <item name="android:textColor">@color/dialpad_secondary_text_color</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,8 +83,23 @@
<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>
</resources>