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

Commit 39e543f1 authored by Fabian Kozynski's avatar Fabian Kozynski Committed by android-build-merger
Browse files

Merge "Fix number of pages in PagedTileLayout" into qt-qpr1-dev

am: 41aaa99f

Change-Id: I733fabb87ba5966545bb7495bf4e0ee89e5782ae
parents a977dfcb 41aaa99f
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -248,7 +248,9 @@ public class PagedTileLayout extends ViewPager implements QSTileLayout {
        int numPages = Math.max(nTiles / mPages.get(0).maxTiles(), 1);
        int numPages = Math.max(nTiles / mPages.get(0).maxTiles(), 1);


        // Add one more not full page if needed
        // Add one more not full page if needed
        numPages += (nTiles % mPages.get(0).maxTiles() == 0 ? 0 : 1);
        if (nTiles > numPages * mPages.get(0).maxTiles()) {
            numPages++;
        }


        final int NP = mPages.size();
        final int NP = mPages.size();
        for (int i = 0; i < NP; i++) {
        for (int i = 0; i < NP; i++) {