更新: 次のレイアウトを使用して、Viewpager に 3 つのテキストビューを実装できますか:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="view 1"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="view 2"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="view 3"/>
</android.support.v4.view.ViewPager>
</LinearLayout>
これら 3 つのビューに ViewPager を実装したいと考えています。ビューページャーとこれらの3つのビューを単一のxmlファイルに入れたいです。各ページには各テキストビューが含まれています。いくつかの例を見てきましたが、各ページは個別の xml レイアウト ファイルを使用して実装されていました。
これら 3 つのビューのビューページャーを単一の xml ファイルに実装するにはどうすればよいですか。可能であれば、サンプルコードまたは例を提供してください。