in this question i Found the following code Android: I am unable to have ViewPager WRAP_CONTENT
<view
android:layout_width="match_parent"
android:layout_height="wrap_content"
class="de.cybergen.ui.layout.WrapContentHeightViewPager"
android:id="@+id/wrapContentHeightViewPager"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"/>
how i can set class programmatically for ViewPager. i have a code like this:
ViewPager vp = new ViewPager(this);
PagesAdapter dp = new PagesAdapter(this);// this class extends PagerAdapter
vp.setAdapter(dp);
i want to use class (WrapContentHeightViewPager) to set Wrap content height ViewPager.