ViewPager in ScrollView

I ran into a similar problem in the past. A View-Pager must have a set height (it cannot wrap-content). Since a ViewPager loads separate pages, and not all at once, it won’t know what ‘wrap-content’ actually means. Setting the layout_height to fill_parent or a set dp allows the ViewPager to statically set it’s height and react more accordingly within other layouts.

Leave a Comment