Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6a63d8e authored by Mihai Niță's avatar Mihai Niță Committed by Android (Google) Code Review
Browse files

Merge "Fix: RTL sublocales need to display RTL"

parents 1a8fbfce 24215eca
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.internal.app;

import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -165,6 +166,14 @@ public class SuggestedLocaleAdapter extends BaseAdapter implements Filterable {
                    localized.setVisibility(View.VISIBLE);
                    text.setTextLocale(Locale.getDefault());
                }
                if (mCountryMode) {
                    int layoutDir = TextUtils.getLayoutDirectionFromLocale(item.getParent());
                    //noinspection ResourceType
                    convertView.setLayoutDirection(layoutDir);
                    text.setTextDirection(layoutDir == View.LAYOUT_DIRECTION_RTL
                            ? View.TEXT_DIRECTION_RTL
                            : View.TEXT_DIRECTION_LTR);
                }
        }
        return convertView;
    }