Fix ScrollLayoutManager.getCurrentIndex()
This commit is contained in:
1 parent
203d6134c2
commit
9b60cdc612
1 file changed
+2
-1
@@ -801,7 +801,8 @@ public class ScrollLayoutManager extends GalleryView.LayoutManager {
|
||||
Rect bound = page.bounds();
|
||||
int pageTop = bound.top;
|
||||
int pageBottom = bound.bottom;
|
||||
if ((pageTop > 0 && pageTop < height) || (pageBottom > 0 && pageBottom < height)) {
|
||||
if ((pageTop >= 0 && pageTop < height) || (pageBottom > 0 && pageBottom <= height) ||
|
||||
(pageTop < 0 && pageBottom > height)) {
|
||||
return page.getIndex();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user