Skip to content

Commit 9a8e0d8

Browse files
committed
Change condition of percentage padding to not allow percentage equals or higher than 50 instead of higher than 100
1 parent 13dec5b commit 9a8e0d8

File tree

1 file changed

+1
-1
lines changed
  • lib/src/main/java/com/example/lib

1 file changed

+1
-1
lines changed

lib/src/main/java/com/example/lib/Deck.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Deck : ViewPager {
5555
when {
5656
percentage == 0 -> initProperties(context, 0f)
5757
percentage < 0 -> throw IllegalArgumentException("Percentage can't be lower than 0")
58-
percentage > 100 -> throw IllegalArgumentException("Percentage can't be higher than 100")
58+
percentage >= 50 -> throw IllegalArgumentException("Your layout will not visible if the percentage equals or higher than 50")
5959
else -> {
6060
val metrics = DisplayMetrics()
6161
(context as Activity).windowManager.defaultDisplay.getMetrics(metrics)

0 commit comments

Comments
 (0)