summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2013-07-24 19:00:04 -0700
committerYorke Lee <yorkelee@google.com>2013-07-30 08:45:12 -0700
commitbf34a90d6c738b7a697095c4ee1c3a108e8fea8d (patch)
treeb0d2c2047736982539da232450b159e3ae5155dd /res
parent6a8402939f667ab70bd0043ed0859f8afbc012ec (diff)
Implement dialpad in XML
Change-Id: I603eb29203b2ae65fe35f423c574a33bb86662a2
Diffstat (limited to 'res')
-rw-r--r--res/layout/dialpad_key.xml43
-rw-r--r--res/layout/new_dialpad.xml61
-rw-r--r--res/layout/new_dialpad_fragment.xml2
-rw-r--r--res/values/strings.xml49
4 files changed, 106 insertions, 49 deletions
diff --git a/res/layout/dialpad_key.xml b/res/layout/dialpad_key.xml
new file mode 100644
index 000000000..eef12a12f
--- /dev/null
+++ b/res/layout/dialpad_key.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 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.
+-->
+
+<!-- A layout representing a single key in the dialpad -->
+<com.android.dialer.dialpad.DialpadKeyButton
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/dialpad_key"
+ style="@style/DialtactsDialpadButtonStyle"
+ android:clickable="true" >
+ <TextView
+ android:id="@+id/dialpad_key_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="#33b5e5"
+ android:textSize="40dp"
+ android:fontFamily="sans-serif-light"
+ android:layout_centerInParent="true"
+ />
+ <TextView
+ android:id="@+id/dialpad_key_letters"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="#aaaaaa"
+ android:textSize="11dp"
+ android:paddingRight="11dp"
+ android:layout_alignBaseline="@id/dialpad_key_number"
+ android:fontFamily="sans-serif-light"
+ android:layout_alignParentRight="true"
+ />
+</com.android.dialer.dialpad.DialpadKeyButton> \ No newline at end of file
diff --git a/res/layout/new_dialpad.xml b/res/layout/new_dialpad.xml
index 29f9cf0e9..e71d4edf0 100644
--- a/res/layout/new_dialpad.xml
+++ b/res/layout/new_dialpad.xml
@@ -26,73 +26,38 @@
android:paddingStart="5dip"
android:paddingEnd="5dip"
android:paddingBottom="10dip"
+ android:stretchColumns="0,1,2"
android:layoutDirection="ltr" >
<TableRow
android:layout_height="0px"
android:layout_weight="1">
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/one" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_1_wht"
- android:contentDescription="@string/description_image_button_one" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/two" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_2_wht"
- android:contentDescription="@string/description_image_button_two" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/three" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_3_wht"
- android:contentDescription="@string/description_image_button_three" />
+ <include layout="@layout/dialpad_key" android:id="@+id/one"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/two"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/three"/>
</TableRow>
<TableRow
android:layout_height="0px"
android:layout_weight="1">
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/four" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_4_wht"
- android:contentDescription="@string/description_image_button_four" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/five" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_5_wht"
- android:contentDescription="@string/description_image_button_five" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/six" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_6_wht"
- android:contentDescription="@string/description_image_button_six" />
+ <include layout="@layout/dialpad_key" android:id="@+id/four"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/five"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/six"/>
</TableRow>
<TableRow
android:layout_height="0px"
android:layout_weight="1">
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/seven" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_7_wht"
- android:contentDescription="@string/description_image_button_seven" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/eight" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_8_wht"
- android:contentDescription="@string/description_image_button_eight" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/nine" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_9_wht"
- android:contentDescription="@string/description_image_button_nine" />
+ <include layout="@layout/dialpad_key" android:id="@+id/seven"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/eight"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/nine"/>
</TableRow>
<TableRow
android:layout_height="0px"
android:layout_weight="1">
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/star" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_star_wht"
- android:contentDescription="@string/description_image_button_star" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/zero" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_0_wht"
- android:contentDescription="@string/description_image_button_zero" />
- <com.android.dialer.dialpad.DialpadImageButton
- android:id="@+id/pound" style="@style/DialtactsDialpadButtonStyle"
- android:src="@drawable/dial_num_pound_wht"
- android:contentDescription="@string/description_image_button_pound" />
+ <include layout="@layout/dialpad_key" android:id="@+id/star"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/zero"/>
+ <include layout="@layout/dialpad_key" android:id="@+id/pound"/>
</TableRow>
</TableLayout>
diff --git a/res/layout/new_dialpad_fragment.xml b/res/layout/new_dialpad_fragment.xml
index 4641e0091..6a27216ec 100644
--- a/res/layout/new_dialpad_fragment.xml
+++ b/res/layout/new_dialpad_fragment.xml
@@ -19,7 +19,7 @@
android:layout_height="match_parent"
android:orientation="vertical" >
<!-- spacer view -->
- <View
+ <Space
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8b7d61a1a..e1f1b0d20 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -537,4 +537,53 @@
<!-- Title of activity that displays a list of all calls -->
<string name="call_log_activity_title">History</string>
+
+ <!-- Do not translate. -->
+ <string name="dialpad_0_number">0</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_0_letters">+</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_1_number">1</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_1_letters"></string>
+ <!-- Do not translate. -->
+ <string name="dialpad_2_number">2</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_2_letters">ABC</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_3_number">3</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_3_letters">DEF</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_4_number">4</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_4_letters">GHI</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_5_number">5</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_5_letters">JKL</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_6_number">6</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_6_letters">MNO</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_7_number">7</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_7_letters">PQRS</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_8_number">8</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_8_letters">TUV</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_9_number">9</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_9_letters">WXYZ</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_star_number">*</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_star_letters"></string>
+ <!-- Do not translate. -->
+ <string name="dialpad_pound_number">#</string>
+ <!-- Do not translate. -->
+ <string name="dialpad_pound_letters"></string>
</resources>