Wrap content height ViewPager
Add following dependencies
compile 'com.kishan.wrapcontentviewpager:wc-viewpager:1.0'
Now you can use anywhere in your layout
<com.kishan.wrapcontentviewpager.WcViewPager
android:layout_width="match_parent"
android:layout_height="wrap_content"
/>