I m trying to set view pager height to wrap_content using this Android: I am unable to have ViewPager WRAP_CONTENT
But it's leaving extra white space at the bottom
How do I remove this space?
This is my xml code:
<android.support.v7.widget.CardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="8dp"
android:layout_marginRight="8dp"
android:layout_marginTop="8dp"
card_view:cardCornerRadius="@dimen/card_corner_radius">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.test.android.custom_views.WrapContentHeightViewPager
android:id="@+id/similarRecipesPager"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:visibility="visible" />
</LinearLayout>
</android.support.v7.widget.CardView>