diff --git a/caldroid/src/main/java/com/antonyt/infiniteviewpager/InfiniteViewPager.java b/caldroid/src/main/java/com/antonyt/infiniteviewpager/InfiniteViewPager.java index 30789aa..ae3565c 100644 --- a/caldroid/src/main/java/com/antonyt/infiniteviewpager/InfiniteViewPager.java +++ b/caldroid/src/main/java/com/antonyt/infiniteviewpager/InfiniteViewPager.java @@ -130,6 +130,9 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { .makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); rowHeight = firstChild.getMeasuredHeight(); + if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN + && firstChild instanceof GridView) + rowHeight += ((GridView)firstChild).getVerticalSpacing(); } // Calculate height of the calendar