Android实现Activity水平和垂直滚动条的方法
发布时间:2016-12-28 来源:查字典编辑
摘要:本文实例讲述了Android实现Activity水平和垂直滚动条的方法。分享给大家供大家参考,具体如下:根标签是ScrollView下面的子...
本文实例讲述了Android实现Activity水平和垂直滚动条的方法。分享给大家供大家参考,具体如下:
<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" > <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > </LinearLayout> </HorizontalScrollView> </ScrollView>
根标签是ScrollView下面的子标签是HorizontalScrollView,然后HorizontalScrollView下面就是你自己的布局了。
Ps:Scrollview和HorizontalScrollView标签下面都只能嵌入一个标签
希望本文所述对大家Android程序设计有所帮助。