Fixed RTL alignment issue in suggested language list

Suggested language list alignment should be as per the default locale.

Test: 1. RTL language
      2. Settings>System>Languages & input>Languages>Add a language>English
      3. Check the alignment
Bug: 70360392

Change-Id: I934b1061fb897ac69270a493562defba4a5a1a35
Signed-off-by: susanta.patra <susanta.patra@lge.com>
This commit is contained in:
susanta.patra
2017-12-08 10:23:13 +05:30
committed by Fan Zhang
parent 247791f9ce
commit a2c1917e37

View File

@@ -199,7 +199,7 @@ public class SuggestedLocaleAdapter extends BaseAdapter implements Filterable {
text.setTextLocale(item.getLocale());
text.setContentDescription(item.getContentDescription(mCountryMode));
if (mCountryMode) {
int layoutDir = TextUtils.getLayoutDirectionFromLocale(item.getParent());
int layoutDir = TextUtils.getLayoutDirectionFromLocale(Locale.getDefault());
//noinspection ResourceType
convertView.setLayoutDirection(layoutDir);
text.setTextDirection(layoutDir == View.LAYOUT_DIRECTION_RTL