Android ViewPager Title Strip at the top of the Screen

857 Views Asked by At

I have to show PagerTitleStrip the top of the screen.I have two View Pager and this Title Strip supposed to be changed with 2nd View Pager.How can I achieve this? Here is my code..

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/bg1136t"
    android:orientation="vertical"
    android:weightSum="100" >

    <android.support.v4.view.ViewPager
        android:id="@+id/viewPagerFeatures"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginTop="2dp"
        android:layout_weight="30" >

        <android.support.v4.view.ViewPager
            android:id="@+id/pager"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_weight="70" >
        </android.support.v4.view.ViewPager>

        <android.support.v4.view.PagerTitleStrip
            android:id="@+id/pager_title_strip"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="top"
            android:background="@drawable/menubar"
            android:paddingBottom="4dp"
            android:paddingTop="4dp"
            android:textColor="#fff" >
        </android.support.v4.view.PagerTitleStrip>
    </android.support.v4.view.ViewPager>

</LinearLayout

>

0

There are 0 best solutions below