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

Commit 94a96283 authored by Fabrice Di Meglio's avatar Fabrice Di Meglio
Browse files

Make PhoneWindow aware of layout direction

- see bug #5429822 UI should be mirrored for RTL locales (Arabic, Hebrew, farsi)

Change-Id: I94508d4ed5d9f9e348c3c19c5e12355f5723659d
parent 3a4832aa
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2841,6 +2841,8 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {
            mDecor = generateDecor();
            mDecor.setDescendantFocusability(ViewGroup.FOCUS_AFTER_DESCENDANTS);
            mDecor.setIsRootNamespace(true);
            mDecor.setLayoutDirection(
                    getContext().getResources().getConfiguration().layoutDirection);
        }
        if (mContentParent == null) {
            mContentParent = generateLayout(mDecor);
@@ -2850,6 +2852,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback {

            mTitleView = (TextView)findViewById(com.android.internal.R.id.title);
            if (mTitleView != null) {
                mTitleView.setLayoutDirection(mDecor.getLayoutDirection());
                if ((getLocalFeatures() & (1 << FEATURE_NO_TITLE)) != 0) {
                    View titleContainer = findViewById(com.android.internal.R.id.title_container);
                    if (titleContainer != null) {