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

Commit a5206a73 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: I58590da5e275f3730133c280261d7aad7615af5b
parents f6ba471a 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++) {