当我把Viewpager与CoordinatorLayout + AppbarLayout + Viewpager一起使用时,viewpager超出屏幕大小,请帮我解决。Android CoordinatorLayout + AppbarLayout + Viewpager布局超过屏幕高度
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_scrollFlags="scroll|enterAlways|snap" />
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
正如你所看到的,ViewPager的高度超过其引起下面一些裁剪元素的父布局,我不知道为什么?
+0
u能PLZ在设备上运行,并再次 –
+0
CHK给它的屏幕截图@vishal patel bro –