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

Commit 246f1c92 authored by fbaron's avatar fbaron
Browse files

Fix pageindicator for RTL mode

Fix: 288981846
Test: Verify that in RTL the page indicator dots and the selected page dot align
Flag: no flag
Change-Id: I103b27c936e59b66ce5a55e1e197cfce594d72d5
parent 551cbc49
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -381,7 +381,9 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator

        // Draw all page indicators;
        float circleGap = mCircleGap;
        float startX = (getWidth() - (mNumPages * circleGap) + mDotRadius) / 2;
        float startX = ((float) getWidth() / 2)
                - (mCircleGap * (((float) mNumPages - 1) / 2))
                - mDotRadius;

        float x = startX + mDotRadius;
        float y = getHeight() / 2;
@@ -420,9 +422,9 @@ public class PageIndicatorDots extends View implements Insettable, PageIndicator
        float startCircle = (int) mCurrentPosition;
        float delta = mCurrentPosition - startCircle;
        float diameter = 2 * mDotRadius;
        float startX;

        startX = ((getWidth() - (mNumPages * mCircleGap) + mDotRadius) / 2);
        float startX = ((float) getWidth() / 2)
                - (mCircleGap * (((float) mNumPages - 1) / 2))
                - mDotRadius;
        sTempRect.top = (getHeight() * 0.5f) - mDotRadius;
        sTempRect.bottom = (getHeight() * 0.5f) + mDotRadius;
        sTempRect.left = startX + (startCircle * mCircleGap);