我现在在 viewpager 之前使用 viewpager,还有一个 tablayout 和 videoview。所以我的 viewpager 片段内容很大,那么它必须显示在滚动视图中,那么我如何在可滚动区域中显示 viewpager 片段视图?一旦我将滚动视图作为片段视图中的父布局,那么 viewpager 不会显示任何片段?如何解决这个问题?我必须使我的 viewpagers 片段可滚动
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/rlayout_detailvideo"
android:layout_width="match_parent"
android:layout_height="300dp"
android:visibility="visible">
<com.app.VideoViewCustom android:id="@+id/videoplayer"
android:layout_width="match_parent"
android:layout_height="300dp"
/>
<ImageView
android:id="@+id/imageview_videodetailbackarrow"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/video_detail_back_btn"
android:padding="15dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="@dimen/videodetail_backarrow_marginleft"
android:layout_marginTop="@dimen/videodetail_backarrow_margintop"/>
<ImageView
android:id="@+id/imageview_edit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/video_detail_edit_btn"
android:padding="15dp"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/videodetail_edit_marginright"
android:layout_marginTop="@dimen/videodetail_backarrow_margintop"/>
<ImageView
android:id="@+id/imageview_bottom"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/video_detail_fullscreen_btn"
android:padding="15dp"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginRight="@dimen/videodetail_edit_marginright"
android:layout_marginTop="@dimen/videodetail_backarrow_margintop"/>
</RelativeLayout>
<android.support.design.widget.TabLayout
android:id="@+id/videodetail_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:tabGravity="fill"
app:tabIndicatorColor="@color/actionbar_backgroundcolor"
app:tabIndicatorHeight="3dp"
android:layout_below="@+id/rlayout_detailvideo"
android:background="#ffffff"
/>
<!--style="@style/MyCustomTabLayout"-->
<View
android:id="@+id/view_videodetail"
android:layout_height="1dp"
android:layout_width="match_parent"
android:background="@android:color/darker_gray"
android:layout_below="@+id/videodetail_tabs"
/>
<android.support.v4.view.ViewPager
android:id="@+id/videodetail_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_below="@+id/view_videodetail"
android:layout_marginTop="@dimen/infotab_layout_margintop"
/>
</RelativeLayout>
如何使 viewpagers 片段布局可滚动?