diff options
author | Andrew Lee <anwlee@google.com> | 2014-05-16 11:17:13 -0700 |
---|---|---|
committer | Andrew Lee <anwlee@google.com> | 2014-05-19 14:12:07 -0700 |
commit | 0e33af66efeac41d4a025f04d883e2cb5563c3b6 (patch) | |
tree | 0409f34f4688241dc9e4198545981457127706b2 /res/layout | |
parent | 5a8976e4ca5e922d5c25f077810afa7643231347 (diff) | |
download | android_packages_apps_ContactsCommon-0e33af66efeac41d4a025f04d883e2cb5563c3b6.tar.gz android_packages_apps_ContactsCommon-0e33af66efeac41d4a025f04d883e2cb5563c3b6.tar.bz2 android_packages_apps_ContactsCommon-0e33af66efeac41d4a025f04d883e2cb5563c3b6.zip |
Implement custom view for rendering numerals.
This is a custom text view intended only for rendering the numerals
(and star and pound) on the dialpad. TextView has built in
top/bottom padding to help account for ascenders/descenders.
Since vertical space is at a premium on the dialpad, particularly
if the font size is scaled to a larger default, for the dialpad we
use this class to more precisely render characters according to the
precise amount of space they need.
Change-Id: I0eb18b2b2c1f31fa87aae30a71f51b323a9906a3
Diffstat (limited to 'res/layout')
-rw-r--r-- | res/layout/dialpad.xml | 10 | ||||
-rw-r--r-- | res/layout/dialpad_key.xml | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/res/layout/dialpad.xml b/res/layout/dialpad.xml index 37b65b56..ecbcf072 100644 --- a/res/layout/dialpad.xml +++ b/res/layout/dialpad.xml @@ -33,12 +33,12 @@ style="@style/DialpadKeyButtonStyle"> <LinearLayout style="@style/DialpadKeyInternalLayoutStyle"> - <TextView + <com.android.contacts.common.dialpad.DialpadTextView android:id="@+id/dialpad_key_number" style="@style/DialpadKeyNumberStyle" /> <RelativeLayout android:layout_width="wrap_content" - android:layout_height="@dimen/dialpad_subtext_height" > + android:layout_height="wrap_content" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -46,6 +46,8 @@ android:src="@drawable/ic_dial_action_vm" android:scaleType="fitCenter" android:layout_centerInParent="true" /> + <!-- Place empty text view so vertical height is same as other dialpad keys. --> + <TextView style="@style/DialpadKeyLettersStyle" /> </RelativeLayout> </LinearLayout> </com.android.contacts.common.dialpad.DialpadKeyButton> @@ -105,7 +107,7 @@ style="@style/DialpadKeyButtonStyle"> <LinearLayout style="@style/DialpadKeyInternalLayoutStyle"> - <TextView + <com.android.contacts.common.dialpad.DialpadTextView android:id="@id/dialpad_key_number" style="@style/DialpadKeyStarPoundStyle" /> </LinearLayout> @@ -118,7 +120,7 @@ style="@style/DialpadKeyButtonStyle"> <LinearLayout style="@style/DialpadKeyInternalLayoutStyle"> - <TextView + <com.android.contacts.common.dialpad.DialpadTextView android:id="@id/dialpad_key_number" style="@style/DialpadKeyStarPoundStyle" /> </LinearLayout> diff --git a/res/layout/dialpad_key.xml b/res/layout/dialpad_key.xml index b7c373a5..1d2d55a5 100644 --- a/res/layout/dialpad_key.xml +++ b/res/layout/dialpad_key.xml @@ -24,7 +24,7 @@ <!-- Note in the referenced styles that we assign hard widths to these components because we want them to line up vertically when we arrange them in an MxN grid --> - <TextView + <com.android.contacts.common.dialpad.DialpadTextView android:id="@+id/dialpad_key_number" style="@style/DialpadKeyNumberStyle" /> |