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

Commit 6fae5ba6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix RTL in StatusIconContainer"

parents 3688309b 6303613b
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -88,7 +88,8 @@ public class StatusIconContainer extends AlphaOptimizedLinearLayout {
     * Layout is happening from end -> start
     */
    private void calculateIconTranslations() {
        float translationX = getWidth();
        float width = getWidth();
        float translationX = width;
        float contentStart = getPaddingStart();
        int childCount = getChildCount();
        // Underflow === don't show content until that index
@@ -133,6 +134,15 @@ public class StatusIconContainer extends AlphaOptimizedLinearLayout {
                }
            }
        }

        // Stole this from NotificationIconContainer. Not optimal but keeps the layout logic clean
        if (isLayoutRtl()) {
            for (int i = 0; i < childCount; i++) {
                View child = getChildAt(i);
                ViewState state = getViewStateFromChild(child);
                state.xTranslation = width - state.xTranslation - child.getWidth();
            }
        }
    }

    private void applyIconStates() {