ViewPager2-如何在页面内滚动内容

时间:2019-06-24 10:13:26

标签: android

    <?xml version="1.0" encoding="utf-8"?>
    <ScrollView
            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`enter code here`_parent">
        <FrameLayout    
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                tools:background="#FEFEFE"
                android:padding="16dp">        
            <TextView
                    android:id="@+id/label_top"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="top|start"
                    android:gravity="center"
                    tools:text=""/>        
        </FrameLayout>        
    </ScrollView>

我在项目中添加了scrollView,但在viewpager 2中没有滚动,我在recyclerview适配器中使用viewpager2作为垂直对象

0 个答案:

没有答案
相关问题