但Layout並沒有捲軸功能,若要增加捲軸則可在Layout前增加ScrollView即可解決。
xml範例如下
原xml:
<RelativeLayout android:id="@+id/contentLayout"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
...
</RelativeLayout>
新xml:
<ScrollView android:id="@+id/contencrollView"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<RelativeLayout android:id="@+id/contentLayout"
android:layout_height="fill_parent"
android:layout_width="fill_parent">
...
</RelativeLayout>
</ScrollView>