Android 如何使用viewPager2包装内容或更改高尺寸项目?

Android 如何使用viewPager2包装内容或更改高尺寸项目?,android,android-viewpager,android-adapter,android-viewpager2,Android,Android Viewpager,Android Adapter,Android Viewpager2,如何使用viewPager2包装内容或更改高项 我已经试过了: android:layout_width="match_parent" android:layout_height="130dp" java.lang.IllegalStateException: Pages must fill the whole ViewPager2 (use match_parent) 我收到错误: android:layout_width="match_parent" android:layout_hei

如何使用viewPager2包装内容或更改高项

我已经试过了:

android:layout_width="match_parent"
android:layout_height="130dp"
java.lang.IllegalStateException: Pages must fill the whole ViewPager2 (use match_parent)
我收到错误:

android:layout_width="match_parent"
android:layout_height="130dp"
java.lang.IllegalStateException: Pages must fill the whole ViewPager2 (use match_parent)
如果我使用:

android:layout_width="match_parent"
android:layout_height="match_parent"
它起作用了。但是,这个项目非常大