summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorTyler Gunn <tgunn@google.com>2014-03-04 21:18:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-03-04 21:18:29 +0000
commit4e0dede09d96862ed4fcfa5a30ad8742aea12414 (patch)
tree7e233fd77906c4a96d4da52503f731dacd7132d0 /res
parent2d0bb562c9985aa0fe26ae1c9649413ce2dac999 (diff)
parente2129528a1bd5bf99163026cbd4e01f97b0877ac (diff)
am e2129528: am 1a31e343: Adding "Speed Dial" title to dialer favorites list and moving "All Contacts" affordance.
* commit 'e2129528a1bd5bf99163026cbd4e01f97b0877ac': Adding "Speed Dial" title to dialer favorites list and moving "All Contacts" affordance.
Diffstat (limited to 'res')
-rw-r--r--res/drawable/background_favorites_menu.xml29
-rw-r--r--res/layout/phone_favorites_menu.xml58
-rw-r--r--res/values/colors.xml13
-rw-r--r--res/values/dimens.xml13
-rw-r--r--res/values/strings.xml18
5 files changed, 131 insertions, 0 deletions
diff --git a/res/drawable/background_favorites_menu.xml b/res/drawable/background_favorites_menu.xml
new file mode 100644
index 000000000..fc2669b10
--- /dev/null
+++ b/res/drawable/background_favorites_menu.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2014 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
+ -->
+
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="false">
+ <shape android:shape="rectangle" >
+ <solid android:color="@color/background_dialer_list_items" />
+ </shape>
+ </item>
+ <item android:state_pressed="true">
+ <shape android:shape="rectangle" >
+ <solid android:color="@color/favorites_menu_pressed_color" />
+ </shape>
+ </item>
+</selector> \ No newline at end of file
diff --git a/res/layout/phone_favorites_menu.xml b/res/layout/phone_favorites_menu.xml
new file mode 100644
index 000000000..d8f2f32c7
--- /dev/null
+++ b/res/layout/phone_favorites_menu.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ~ Copyright (C) 2014 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
+ -->
+
+<!-- The phone favorites menu appears on the main dialer screen above the favorite callers area,
+ and provides access to the All Contacts list. -->
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/phone_favorites_menu"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingLeft="@dimen/favorites_menu_margin"
+ android:paddingRight="@dimen/favorites_menu_margin"
+ android:paddingTop="@dimen/favorites_menu_margin"
+ android:paddingBottom="@dimen/favorites_menu_margin"
+ android:background="@drawable/background_favorites_menu"
+ android:addStatesFromChildren="true"
+ >
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/favorites_menu_speed_dial_height"
+ android:fontFamily="@string/favorites_menu_speed_dial_font_family"
+ android:text="@string/favorites_menu_speed_dial"
+ android:textSize="@dimen/favorites_menu_speed_dial_text_size"
+ android:textColor="@color/speed_dial_text_color"
+ android:layout_alignParentLeft="true"
+ android:layout_centerVertical="true"
+ android:gravity="center"
+ />
+ <TextView
+ android:id="@+id/all_contacts_button"
+ android:fontFamily="@string/favorites_menu_all_contacts_font_family"
+ android:layout_width="wrap_content"
+ android:layout_height="@dimen/favorites_menu_all_contacts_height"
+ android:paddingLeft="@dimen/favorites_menu_padding"
+ android:paddingRight="@dimen/favorites_menu_padding"
+ android:text="@string/favorites_menu_all_contacts"
+ android:textSize="@dimen/favorites_menu_all_contacts_text_size"
+ android:background="@color/all_contacts_button_color"
+ android:textColor="@color/all_contacts_button_text_color"
+ android:layout_alignParentRight="true"
+ android:layout_centerVertical="true"
+ android:gravity="center"
+ android:focusable="true"
+ />
+</RelativeLayout> \ No newline at end of file
diff --git a/res/values/colors.xml b/res/values/colors.xml
index b2d4bc560..370bdfeb6 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -70,4 +70,17 @@
<!-- Text color for no favorites message -->
<color name="nofavorite_text_color">#777777</color>
+
+ <!-- Text color for the "speed dial" label in the favorites menu. -->
+ <color name="speed_dial_text_color">#555555</color>
+
+ <!-- Background color for the "All Contacts" button in the favorites menu. -->
+ <color name="all_contacts_button_color">#999999</color>
+
+ <!-- Background color for the favorites menu when pressed. -->
+ <color name="favorites_menu_pressed_color">#d6d6d6</color>
+
+ <!-- Text color for the "All Contacts" button above the favorite callers -->
+ <color name="all_contacts_button_text_color">#ffffff</color>
+
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 942698741..3c856d2e6 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -83,4 +83,17 @@
<!-- Padding for the tooltip -->
<dimen name="dismiss_button_padding_start">20dip</dimen>
<dimen name="dismiss_button_padding_end">28dip</dimen>
+
+ <!-- Margin around the favorites menu. -->
+ <dimen name="favorites_menu_margin">6dp</dimen>
+ <!-- Padding within the favorites menu. -->
+ <dimen name="favorites_menu_padding">4dp</dimen>
+ <!-- Text size for the "speed dial" text in the favorites menu. -->
+ <dimen name="favorites_menu_speed_dial_text_size">18sp</dimen>
+ <!-- Height of the speed dial TextView in the favorites menu. -->
+ <dimen name="favorites_menu_speed_dial_height">24dp</dimen>
+ <!-- Text size for the "All Contacts" text in the favorites menu. -->
+ <dimen name="favorites_menu_all_contacts_text_size">12sp</dimen>
+ <!-- Height of the all contacts Button in the favorites menu. -->
+ <dimen name="favorites_menu_all_contacts_height">24dp</dimen>
</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index e84834113..2564cd7bd 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -719,4 +719,22 @@
<!-- Content description for dismiss button on badge. [CHAR LIMIT=NONE] -->
<string name="description_dismiss">Dismiss</string>
+
+ <!-- Header text displayed on the main dialer screen above the list of favorite phone numbers.
+ [CHAR LIMIT=21] -->
+ <string name="favorites_menu_speed_dial">Speed Dial</string>
+
+ <!-- Button text for the "all contacts" button displayed on the main dialer screen above the
+ list of favorite phone numbers. Navigates the user to the "All Contacts" list.
+ This text represents the same action as the text in string "menu_allContacts".
+ [CHAR LIMIT=21] -->
+ <string name="favorites_menu_all_contacts">ALL CONTACTS</string>
+
+ <!-- The font-family to use for the "speed dial" label on the favorites menu.
+ Do not translate. -->
+ <string name="favorites_menu_speed_dial_font_family">sans-serif-light</string>
+
+ <!-- The font-family to use for the "all contacts" label on the favorites menu.
+ Do not translate. -->
+ <string name="favorites_menu_all_contacts_font_family">sans-serif</string>
</resources>