ScrollView與HorizontalSrollView結合實現可橫豎向滑動的介面
阿新 • • 發佈:2019-02-01
<?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" > <HorizontalScrollView android:layout_width="match_parent" android:layout_height="wrap_content"> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="1243213512t124tregwergasdvzcbaagadgasdg htrhsdfhdsfhds" android:textSize="80sp" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="1243213512t124tregwergasdvzcbaagadgasdg htrhsdfhdsfhds" android:textSize="80sp" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="1243213512t124tregwergasdvzcbaagadgasdg htrhsdfhdsfhds" android:textSize="80sp" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="1243213512t124tregwergasdvzcbaagadgasdg htrhsdfhdsfhds" android:textSize="80sp" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="1243213512t124tregwergasdvzcbaagadgasdg htrhsdfhdsfhds" android:textSize="80sp" /> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="1243213512t124tregwergasdvzcbaagadgasdg htrhsdfhdsfhds" android:textSize="80sp" /> </LinearLayout> </HorizontalScrollView> </ScrollView>