diff --git a/autoScrollViewPager/src/main/java/com/kcode/autoscrollviewpager/view/BaseViewPagerAdapter.java b/autoScrollViewPager/src/main/java/com/kcode/autoscrollviewpager/view/BaseViewPagerAdapter.java index 5ae0ce2..853de45 100644 --- a/autoScrollViewPager/src/main/java/com/kcode/autoscrollviewpager/view/BaseViewPagerAdapter.java +++ b/autoScrollViewPager/src/main/java/com/kcode/autoscrollviewpager/view/BaseViewPagerAdapter.java @@ -92,7 +92,7 @@ public void add(List list){ @Override public int getCount() { - return data == null ? 0 : Integer.MAX_VALUE; + return (data == null || data.size() == 0 ) ? 0 : Integer.MAX_VALUE; } public int getRealCount(){