Android双向滚动

贺浩壤
2023-12-01
//ScrollView 与 HorizontalScrollView 嵌套使用
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:scrollbars="vertical" >
    <HorizontalScrollView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:scrollbars="horizontal"
        >
        <LinearLayout
            android:orientation="vertical"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            >
            
        </LinearLayout>
    </HorizontalScrollView>
</ScrollView>
 类似资料: