私のメインのxmlレイアウトファイル....
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/relLayoutPlayerActivity"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroundimage"
android:orientation="vertical" >
</LinearLayout>
ビューページャーを作成しました.....
そのレイアウトファイル……
<?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:orientation="vertical" >
<android.support.v4.view.ViewPager
android:id="@+id/carousel_layout_home"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:overScrollMode="never" />
</LinearLayout>
3 つのクラスと別の xml ファイルを作成して、このビュー ページャーに画像をロードします...今度は、このビューページャーをメイン xml ファイルの linearlayout に追加したいと思います....
これは、mainxml ファイルで viewpager を動的に表示したいということです。どうやってそれを?答えてください
ありがとうございました