ScrollView嵌套Viewpager 造成数据显示不全

2018-06-14  本文已影响35人  zhengLH

【解决】

图片.png
<ScrollView>
    .....
<android.support.design.widget.CoordinatorLayout
                android:id="@+id/main_content"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <android.support.design.widget.AppBarLayout
                    android:id="@+id/appbar"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

                    <android.support.design.widget.TabLayout
                        android:id="@+id/tab_layout"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        app:tabBackground="@color/white"
                        app:tabGravity="fill"
                        app:tabIndicatorColor="@color/colorPrimaryDark"
                        app:tabMode="fixed"
                        app:tabSelectedTextColor="@color/colorPrimaryDark"
                        app:tabTextColor="@color/text_gray">

                    </android.support.design.widget.TabLayout>

                </android.support.design.widget.AppBarLayout>

                <android.support.v4.view.ViewPager
                    android:id="@+id/vp_adviser"
                    android:layout_width="match_parent"
                    app:layout_behavior="@string/appbar_scrolling_view_behavior"
                    android:layout_height="480dp"/>

            </android.support.design.widget.CoordinatorLayout>
</ScrollView>
上一篇下一篇

猜你喜欢

热点阅读