Fix ScrollLayoutManager.getCurrentIndex()

This commit is contained in:
seven332 committed 2016-03-30 20:35:58 +08:00
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();
}
}