Android实现Activity水平和垂直滚动条的方法
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程序设计有所帮助。

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新安卓软件开发学习
热门安卓软件开发学习
编程开发子分类