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

Commit 8991d65b authored by Bryan Eyler's avatar Bryan Eyler
Browse files

Remove unnecessary/misleading page indication dot.

Don't show page indication dot(s) when there's only one page.

Bug 36454400
Tested on Mojave

Change-Id: Icd9f2bff91e508c3cd07c51ecf6c5956b9e3f378
parent 045de63a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -98,6 +98,11 @@ public class PageIndicator extends View {
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);

        // Don't draw anything unless there's multiple pages to scroll through.  No need to clear
        // any previous dots, since onDraw provides a canvas that's already cleared.
        if (mPageCount <= 1)
            return;

        int x = canvas.getWidth() / 2 - (mPageCount / 2) * mStep;
        int y = canvas.getHeight() / 2;