diff options
| author | Roshan Pius <rpius@google.com> | 2015-06-18 23:43:19 +0000 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2015-06-18 23:43:19 +0000 |
| commit | b5e9842f9b8224aebb0b10117c2507e618143045 (patch) | |
| tree | f16027c118b17ff680750d876012b663b5b2fe2d | |
| parent | 4a3664267eccf6069b67433d0caff529210c2367 (diff) | |
| parent | fa36ce56b56eafac5dcd9908cc14b9e4de608648 (diff) | |
| download | packages_apps_PhoneCommon-b5e9842f9b8224aebb0b10117c2507e618143045.tar.gz packages_apps_PhoneCommon-b5e9842f9b8224aebb0b10117c2507e618143045.tar.bz2 packages_apps_PhoneCommon-b5e9842f9b8224aebb0b10117c2507e618143045.zip | |
am fa36ce56: Add letters associated with a number to content description.
* commit 'fa36ce56b56eafac5dcd9908cc14b9e4de608648':
Add letters associated with a number to content description.
| -rw-r--r-- | src/com/android/phone/common/dialpad/DialpadView.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/com/android/phone/common/dialpad/DialpadView.java b/src/com/android/phone/common/dialpad/DialpadView.java index b5c3982..43bbeca 100644 --- a/src/com/android/phone/common/dialpad/DialpadView.java +++ b/src/com/android/phone/common/dialpad/DialpadView.java @@ -153,12 +153,21 @@ public class DialpadView extends LinearLayout { lettersView = (TextView) dialpadKey.findViewById(R.id.dialpad_key_letters); final String numberString; + final String numberContentDescription; if (mButtonIds[i] == R.id.pound) { numberString = resources.getString(R.string.dialpad_pound_number); + numberContentDescription = numberString; } else if (mButtonIds[i] == R.id.star) { numberString = resources.getString(R.string.dialpad_star_number); + numberContentDescription = numberString; } else { numberString = nf.format(i); + // The content description is used for announcements on key + // press when TalkBack is enabled. They contain a "," + // (to introduce a slight delay) followed by letters + // corresponding to the keys in addition to the number. + numberContentDescription = numberString + "," + + resources.getString(letterIds[i]); } final RippleDrawable rippleBackground = @@ -169,7 +178,7 @@ public class DialpadView extends LinearLayout { numberView.setText(numberString); numberView.setElegantTextHeight(false); - dialpadKey.setContentDescription(numberString); + dialpadKey.setContentDescription(numberContentDescription); dialpadKey.setBackground(rippleBackground); if (lettersView != null) { |
