Създадох изглед на раздел с плъзгане, използвайки „android.support.v4.view.ViewPager“ и „android.support.v4.view.PagerTitleStrip“. сега трябва да покажа бутон или TextView в горната част на заглавната лента. Дори ако добавя текстовия изглед над заглавната лента, той не се показва. Моят xml файл е даден по-долу.
<android.support.v4.view.ViewPager xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="@drawable/home_background11" >
<TextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello"/>
<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="#33b5e5"
android:paddingBottom="4dp"
android:paddingTop="4dp"
android:textColor="#fff" />
</android.support.v4.view.ViewPager>