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

Unverified Commit 0e78e82b authored by Wolfram Liebchen's avatar Wolfram Liebchen Committed by Michael Bestas
Browse files

fixup! SystemUI: add left and right virtual buttons while typing

The arrow keys in the navigation bar during typing must keep their
position and orientation in inverted layout and/or RTL environment.
In the layout the left (right) button must stay 'left' ('right') not
be 'start' ('end'). Likewise the drawings should not be auto-mirror,
so special left/right drawings are added to the existing start/end
drawings which keep the correct orientation.

Change-Id: I0eed42d33ff431d7a6ca44555010481af9f03493
parent c0019927
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
        android:viewportWidth="24"
        android:viewportHeight="24"
        android:tint="?attr/colorControlNormal"
        android:autoMirrored="true">
        android:autoMirrored="false">
    <path
        android:fillColor="?attr/singleToneColor"
        android:pathData="M15.41 7.41L14 6l-6 6 6 6 1.41,-1.41L10.83 12z"/>
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@
        android:viewportWidth="24"
        android:viewportHeight="24"
        android:tint="?attr/colorControlNormal"
        android:autoMirrored="true">
        android:autoMirrored="false">
    <path
        android:fillColor="?attr/singleToneColor"
        android:pathData="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6,-6z"/>
+2 −2
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
        android:id="@+id/dpad_left"
        android:layout_width="@dimen/navigation_side_padding"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        android:layout_gravity="left"
        systemui:keyCode="21"
        android:scaleType="center"
        android:contentDescription="@string/accessibility_dpad_left" />
@@ -30,7 +30,7 @@
        android:id="@+id/dpad_right"
        android:layout_width="@dimen/navigation_side_padding"
        android:layout_height="match_parent"
        android:layout_gravity="end"
        android:layout_gravity="right"
        systemui:keyCode="22"
        android:scaleType="center"
        android:contentDescription="@string/accessibility_dpad_right" />
+4 −4
Original line number Diff line number Diff line
@@ -303,9 +303,9 @@ public class NavigationBarView extends FrameLayout {
                new ContextualButton(R.id.accessibility_button, mLightContext,
                        R.drawable.ic_sysbar_accessibility_button);
        final ContextualButton cursorLeftButton = new ContextualButton(R.id.dpad_left,
                mLightContext, R.drawable.ic_chevron_start);
                mLightContext, R.drawable.ic_chevron_left);
        final ContextualButton cursorRightButton = new ContextualButton(R.id.dpad_right,
                mLightContext, R.drawable.ic_chevron_end);
                mLightContext, R.drawable.ic_chevron_right);
        mContextualButtonGroup.addButton(imeSwitcherButton);
        mContextualButtonGroup.addButton(accessibilityButton);
        mFloatingRotationButton = new FloatingRotationButton(mContext,
@@ -501,8 +501,8 @@ public class NavigationBarView extends FrameLayout {
        }
        if (densityChange || dirChange) {
            mRecentIcon = getDrawable(R.drawable.ic_sysbar_recent);
            mCursorLeftIcon = getDrawable(R.drawable.ic_chevron_start);
            mCursorRightIcon = getDrawable(R.drawable.ic_chevron_end);
            mCursorLeftIcon = getDrawable(R.drawable.ic_chevron_left);
            mCursorRightIcon = getDrawable(R.drawable.ic_chevron_right);
            mContextualButtonGroup.updateIcons(mLightIconColor, mDarkIconColor);
        }
        if (orientationChange || densityChange || dirChange) {