summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/drawable-hdpi/ic_dial_action_vm.pngbin560 -> 727 bytes
-rw-r--r--res/drawable-mdpi/ic_dial_action_vm.pngbin440 -> 522 bytes
-rw-r--r--res/drawable-xhdpi/ic_dial_action_vm.pngbin723 -> 929 bytes
-rw-r--r--res/layout/dialpad.xml41
-rw-r--r--res/layout/dialpad_key.xml40
-rw-r--r--res/values/dimens.xml3
-rw-r--r--src/com/android/dialer/dialpad/DialpadFragment.java9
-rw-r--r--src/com/android/dialer/dialpad/DialpadKeyButton.java4
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
--- a/res/drawable-hdpi/ic_dial_action_vm.png
+++ b/res/drawable-hdpi/ic_dial_action_vm.png
Binary files 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
--- a/res/drawable-mdpi/ic_dial_action_vm.png
+++ b/res/drawable-mdpi/ic_dial_action_vm.png
Binary files 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
--- a/res/drawable-xhdpi/ic_dial_action_vm.png
+++ b/res/drawable-xhdpi/ic_dial_action_vm.png
Binary files 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" >
- <TextView
- android:id="@+id/dialpad_key_number"
+ <LinearLayout
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/dialpad_primary_text_color"
- android:textSize="@dimen/dialpad_key_numbers_size"
- android:fontFamily="sans-serif-light"
- android:layout_centerInParent="true" />
- <ImageView
- android:id="@+id/dialpad_key_voicemail"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:src="@drawable/ic_dial_action_vm"
- android:paddingRight="11dp"
- android:layout_alignBaseline="@id/dialpad_key_number"
- android:baselineAlignBottom="true"
- android:layout_alignParentRight="true" />
+ android:layout_height="match_parent"
+ android:layout_gravity="center" >
+ <TextView
+ android:id="@+id/dialpad_key_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@color/dialpad_primary_text_color"
+ android:textSize="@dimen/dialpad_key_numbers_size"
+ android:fontFamily="sans-serif-light"/>
+ <ImageView
+ android:id="@+id/dialpad_key_voicemail"
+ android:layout_width="@dimen/dialpad_key_letters_width"
+ android:layout_height="wrap_content"
+ android:src="@drawable/ic_dial_action_vm"
+ android:paddingLeft="11dp"
+ android:scaleType="fitStart"
+ android:baselineAlignBottom="true" />
+ </LinearLayout>
</com.android.dialer.dialpad.DialpadKeyButton>
<include layout="@layout/dialpad_key" android:id="@+id/two"/>
<include layout="@layout/dialpad_key" android:id="@+id/three"/>
@@ -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" />
</com.android.dialer.dialpad.DialpadKeyButton>
<include layout="@layout/dialpad_key" android:id="@+id/zero"/>
<com.android.dialer.dialpad.DialpadKeyButton
@@ -105,7 +109,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" />
</com.android.dialer.dialpad.DialpadKeyButton>
</TableRow>
</TableLayout>
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" >
- <TextView
- android:id="@+id/dialpad_key_number"
+ <LinearLayout
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:textColor="@color/dialpad_primary_text_color"
- android:textSize="@dimen/dialpad_key_numbers_size"
- 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="@color/dialpad_secondary_text_color"
- android:textSize="@dimen/dialpad_key_letters_size"
- android:paddingRight="11dp"
- android:layout_alignBaseline="@id/dialpad_key_number"
- android:fontFamily="sans-serif-light"
- android:layout_alignParentRight="true"
- />
+ android:layout_height="match_parent"
+ android:layout_gravity="center">
+ <TextView
+ android:id="@+id/dialpad_key_number"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="@color/dialpad_primary_text_color"
+ android:textSize="@dimen/dialpad_key_numbers_size"
+ android:fontFamily="sans-serif-light"
+ />
+ <TextView
+ android:id="@+id/dialpad_key_letters"
+ android:layout_width="@dimen/dialpad_key_letters_width"
+ android:layout_height="wrap_content"
+ android:textColor="@color/dialpad_secondary_text_color"
+ android:textSize="@dimen/dialpad_key_letters_size"
+ android:paddingLeft="11dp"
+ android:fontFamily="sans-serif-light"
+ />
+ </LinearLayout>
</com.android.dialer.dialpad.DialpadKeyButton> \ No newline at end of file
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index ef45e4ca1..87b0c1dd2 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -52,7 +52,10 @@
<!-- Text dimensions for dialpad keys -->
<dimen name="dialpad_key_numbers_size">40dp</dimen>
<dimen name="dialpad_key_letters_size">11dp</dimen>
+ <dimen name="dialpad_key_plus_size">15dp</dimen>
<dimen name="dialpad_key_special_characters_size">25dp</dimen>
+ <dimen name="dialpad_key_letters_width">41dp</dimen>
+
<dimen name="fake_action_bar_height">48dp</dimen>
<!-- Min with of fake menu buttons, which should be same as ActionBar's one -->
diff --git a/src/com/android/dialer/dialpad/DialpadFragment.java b/src/com/android/dialer/dialpad/DialpadFragment.java
index c976a9e74..406612288 100644
--- a/src/com/android/dialer/dialpad/DialpadFragment.java
+++ b/src/com/android/dialer/dialpad/DialpadFragment.java
@@ -53,6 +53,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;
@@ -626,10 +627,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(
@@ -642,6 +645,10 @@ public class DialpadFragment extends Fragment
dialpadKey.setContentDescription(numberString);
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;