From c341db0532d8b60ca29aa0becf05a4eec9bdc43e Mon Sep 17 00:00:00 2001 From: Fabrice Di Meglio Date: Wed, 3 Apr 2013 21:11:37 -0700 Subject: Fix for bug #8146846 Phone App should be mirrored for RTL languages - replace left/right properties with start/end ones (Dialer will never be unbundled) - add mirrored version of some drawables - update AndroidManifest Change-Id: Ia7f5b6ad13dd75fe42f1ee763dda5ab18e2d92c7 --- src/com/android/dialer/DialtactsActivity.java | 3 ++- src/com/android/dialer/PhoneCallDetailsHelper.java | 4 ++++ src/com/android/dialer/list/PhoneFavoriteFragment.java | 6 ++++-- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/com/android/dialer/DialtactsActivity.java b/src/com/android/dialer/DialtactsActivity.java index 2557ebc3e..32339d2cf 100644 --- a/src/com/android/dialer/DialtactsActivity.java +++ b/src/com/android/dialer/DialtactsActivity.java @@ -680,7 +680,8 @@ public class DialtactsActivity extends TransactionSafeActivity implements View.O mSearchFragment.setOnPhoneNumberPickerActionListener(mPhoneNumberPickerActionListener); mSearchFragment.setQuickContactEnabled(true); mSearchFragment.setDarkTheme(true); - mSearchFragment.setPhotoPosition(ContactListItemView.PhotoPosition.LEFT); + mSearchFragment.setPhotoPosition(ContactListItemView.getDefaultPhotoPosition( + true /* opposite */)); mSearchFragment.setUseCallableUri(true); if (mContactListFilterController != null && mContactListFilterController.getFilter() != null) { diff --git a/src/com/android/dialer/PhoneCallDetailsHelper.java b/src/com/android/dialer/PhoneCallDetailsHelper.java index f8ca769fc..51b110910 100644 --- a/src/com/android/dialer/PhoneCallDetailsHelper.java +++ b/src/com/android/dialer/PhoneCallDetailsHelper.java @@ -115,10 +115,14 @@ public class PhoneCallDetailsHelper { numberText = details.geocode; } labelText = null; + // We have a real phone number as "nameView" so make it always LTR + views.nameView.setTextDirection(View.TEXT_DIRECTION_LTR); } else { nameText = details.name; numberText = displayNumber; labelText = numberFormattedLabel; + // We have a real phone number as "numberView" so make it always LTR + views.numberView.setTextDirection(View.TEXT_DIRECTION_LTR); } views.nameView.setText(nameText); diff --git a/src/com/android/dialer/list/PhoneFavoriteFragment.java b/src/com/android/dialer/list/PhoneFavoriteFragment.java index 93f38bb75..97481bc35 100644 --- a/src/com/android/dialer/list/PhoneFavoriteFragment.java +++ b/src/com/android/dialer/list/PhoneFavoriteFragment.java @@ -301,8 +301,10 @@ public class PhoneFavoriteFragment extends Fragment implements OnItemClickListen mAllContactsAdapter.setSectionHeaderDisplayEnabled(true); // Disable pinned header. It doesn't work with this fragment. mAllContactsAdapter.setPinnedPartitionHeadersEnabled(false); - // Put photos on left for consistency with "frequent" contacts section. - mAllContactsAdapter.setPhotoPosition(ContactListItemView.PhotoPosition.LEFT); + // Put photos on START (LEFT in LTR layout direction and RIGHT in RTL layout direction) + // for consistency with "frequent" contacts section. + mAllContactsAdapter.setPhotoPosition(ContactListItemView.getDefaultPhotoPosition( + true /* opposite */ )); // Use Callable.CONTENT_URI which will include not only phone numbers but also SIP // addresses. -- cgit v1.2.3