From dc4aa3a5209d09b508cc5a9ccf351100ffd7865e Mon Sep 17 00:00:00 2001 From: Mai Cervantes Date: Thu, 1 Dec 2016 12:12:48 +0800 Subject: [PATCH] fixed bugs with computing number of pages wnhen loading imageS --- .../main/java/com/esafirm/imagepicker/features/ImageLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImageLoader.java b/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImageLoader.java index be6d40cb..7973b0aa 100644 --- a/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImageLoader.java +++ b/imagepicker/src/main/java/com/esafirm/imagepicker/features/ImageLoader.java @@ -165,7 +165,7 @@ public void run() { countCursor.close(); } - int numOfPages = (int) Math.ceil(count / pageSize); + int numOfPages = (int) Math.ceil((double)count / pageSize); for (int page = 0; page < numOfPages; page++) { if(folder != null && !folder.equals(currentFolder))