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

Commit 7538580f authored by Amit Kumar's avatar Amit Kumar 💻
Browse files

Add PagedView to replace HorizontalPager

parent a3c09fee
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -177,4 +177,12 @@ public class Utilities {
        return defaultValue;
    }

    /**
     * Ensures that a value is within given bounds. Specifically:
     * If value is less than lowerBound, return lowerBound; else if value is greater than upperBound,
     * return upperBound; else return value unchanged.
     */
    public static int boundToRange(int value, int lowerBound, int upperBound) {
        return Math.max(lowerBound, Math.min(value, upperBound));
    }
}