From 778408732c1e8fb81d1b5dc6df92725aa397e978 Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Fri, 6 Sep 2013 12:08:08 -0700 Subject: Tweak Dialpad redlines Centralize dialpad keys Change voicemail icon Bug: 10445734 Bug: 10510368 Change-Id: I1e9dc98c9aed07c26bdfe176f4a4c94c65fc6d85 --- res/drawable-hdpi/ic_dial_action_vm.png | Bin 560 -> 727 bytes res/drawable-mdpi/ic_dial_action_vm.png | Bin 440 -> 522 bytes res/drawable-xhdpi/ic_dial_action_vm.png | Bin 723 -> 929 bytes res/layout/dialpad.xml | 41 ++++++++++++--------- res/layout/dialpad_key.xml | 40 ++++++++++---------- res/values/dimens.xml | 3 ++ .../android/dialer/dialpad/DialpadFragment.java | 9 ++++- .../android/dialer/dialpad/DialpadKeyButton.java | 4 +- 8 files changed, 57 insertions(+), 40 deletions(-) diff --git a/res/drawable-hdpi/ic_dial_action_vm.png b/res/drawable-hdpi/ic_dial_action_vm.png index 68ee3d6c9..f4243043a 100644 Binary files a/res/drawable-hdpi/ic_dial_action_vm.png and b/res/drawable-hdpi/ic_dial_action_vm.png differ diff --git a/res/drawable-mdpi/ic_dial_action_vm.png b/res/drawable-mdpi/ic_dial_action_vm.png index 5b91b42a6..fbcf378cf 100644 Binary files a/res/drawable-mdpi/ic_dial_action_vm.png and b/res/drawable-mdpi/ic_dial_action_vm.png differ diff --git a/res/drawable-xhdpi/ic_dial_action_vm.png b/res/drawable-xhdpi/ic_dial_action_vm.png index 269fd1a92..2919bbde2 100644 Binary files a/res/drawable-xhdpi/ic_dial_action_vm.png and b/res/drawable-xhdpi/ic_dial_action_vm.png differ diff --git a/res/layout/dialpad.xml b/res/layout/dialpad.xml index 60240bc3f..ec850c971 100644 --- a/res/layout/dialpad.xml +++ b/res/layout/dialpad.xml @@ -37,23 +37,26 @@ android:id="@+id/one" style="@style/DialtactsDialpadButtonStyle" android:clickable="true" > - - + android:layout_height="match_parent" + android:layout_gravity="center" > + + + @@ -90,7 +93,8 @@ android:textColor="@color/dialpad_secondary_text_color" android:textSize="@dimen/dialpad_key_special_characters_size" android:fontFamily="sans-serif-light" - android:layout_centerInParent="true" /> + android:paddingRight="@dimen/dialpad_key_letters_width" + android:layout_gravity="center" /> + android:paddingRight="@dimen/dialpad_key_letters_width" + android:layout_gravity="center" /> diff --git a/res/layout/dialpad_key.xml b/res/layout/dialpad_key.xml index b204c20a2..074e0235f 100644 --- a/res/layout/dialpad_key.xml +++ b/res/layout/dialpad_key.xml @@ -19,24 +19,26 @@ xmlns:android="http://schemas.android.com/apk/res/android" style="@style/DialtactsDialpadButtonStyle" android:clickable="true" > - - + android:layout_height="match_parent" + android:layout_gravity="center"> + + + \ No newline at end of file diff --git a/res/values/dimens.xml b/res/values/dimens.xml index e03e91916..fe4c0a1e1 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -52,7 +52,10 @@ 40dp 11dp + 15dp 25dp + 41dp + 48dp diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java index 79e830730..0465ddbbf 100644 --- a/src/com/android/dialer/dialpad/DialpadFragment.java +++ b/src/com/android/dialer/dialpad/DialpadFragment.java @@ -52,6 +52,7 @@ import android.text.style.RelativeSizeSpan; import android.util.AttributeSet; import android.util.DisplayMetrics; import android.util.Log; +import android.util.TypedValue; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.Menu; @@ -600,10 +601,12 @@ public class DialpadFragment extends Fragment R.string.dialpad_8_letters, R.string.dialpad_9_letters, R.string.dialpad_star_letters, R.string.dialpad_pound_letters}; + final Resources resources = getResources(); + DialpadKeyButton dialpadKey; TextView numberView; TextView lettersView; - final Resources resources = getResources(); + for (int i = 0; i < buttonIds.length; i++) { dialpadKey = (DialpadKeyButton) fragmentView.findViewById(buttonIds[i]); dialpadKey.setLayoutParams(new TableRow.LayoutParams( @@ -614,6 +617,10 @@ public class DialpadFragment extends Fragment numberView.setText(resources.getString(numberIds[i])); if (lettersView != null) { lettersView.setText(resources.getString(letterIds[i])); + if (buttonIds[i] == R.id.zero) { + lettersView.setTextSize(TypedValue.COMPLEX_UNIT_PX, resources.getDimension( + R.dimen.dialpad_key_plus_size)); + } } } diff --git a/src/com/android/dialer/dialpad/DialpadKeyButton.java b/src/com/android/dialer/dialpad/DialpadKeyButton.java index 9aae631a5..9a20993d6 100644 --- a/src/com/android/dialer/dialpad/DialpadKeyButton.java +++ b/src/com/android/dialer/dialpad/DialpadKeyButton.java @@ -25,7 +25,7 @@ import android.view.View; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; import android.view.accessibility.AccessibilityNodeInfo; -import android.widget.RelativeLayout; +import android.widget.FrameLayout; /** * Custom class for dialpad buttons. @@ -33,7 +33,7 @@ import android.widget.RelativeLayout; * This class implements lift-to-type interaction when touch exploration is * enabled. */ -public class DialpadKeyButton extends RelativeLayout { +public class DialpadKeyButton extends FrameLayout { /** Accessibility manager instance used to check touch exploration state. */ private AccessibilityManager mAccessibilityManager; -- cgit v1.2.3