Здесь я реализую фрагмент. Когда я помещаю свой fragmentBottomFragment
под пейджером, его не отображает, но когда я пишу выше, это работает. Здесь я вставляя свой код XML:Фрагмент не отображается
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".ProductDetails" >
<fragment
android:id="@+id/fragmentTopFragment"
android:name="com.test.abc.ProductDetailsTopFragment"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v4.view.ViewPager
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/pager"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</android.support.v4.view.ViewPager>
</RelativeLayout>
<fragment
android:id="@+id/fragmentBottomFragment"
android:name="com.test.abc.ProductDetailsBottomFragment"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
Если один из ответов решил вашу проблему, вы должны принять ответ, чтобы помочь людям, которые имеют такую же проблему в будущем. –