Viewpager Neither Shows Actionbar Nor Pagerslidingtabstrip
Below is the code which i have implemented for ViewPager and adding PagerSlidingTabStrip.But my viewpager neither shows ActionBar nor shows PagerSlidingTabStrip.If i try to add act
Solution 1:
From the github page of the PagerSlidingTabStrip
project you are using:
- Include the PagerSlidingTabStrip widget in your layout. This should usually be placed above the ViewPager it represents.
So, you layout should be something along the lines of:
<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"><com.astuetz.PagerSlidingTabStripandroid:id="@+id/tabs"android:layout_width="match_parent"android:layout_height="48dip" /><android.support.v4.view.ViewPagerxmlns:android="http://schemas.android.com/apk/res/android"xmlns:app="http://schemas.android.com/apk/res-auto"android:id="@+id/viewPager"android:layout_width="match_parent"android:layout_height="match_parent"android:layout_below="@+id/tabs"android:layout_alignParentBottom="true" /></RelativeLayout>
Post a Comment for "Viewpager Neither Shows Actionbar Nor Pagerslidingtabstrip"