本文实例讲述了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相关内容感兴趣的读者可查看本站专题:《Android编程之activity操作技巧总结》、《Android视图View技巧总结》、《Android操作SQLite数据库技巧总结》、《Android操作json格式数据技巧总结》、《Android数据库操作技巧总结》、《Android文件操作技巧汇总》、《Android编程开发之SD卡操作方法汇总》、《Android开发入门与进阶教程》、《Android资源操作技巧汇总》及《Android控件用法总结》
希望本文所述对大家Android程序设计有所帮助。
本文地址:https://www.stayed.cn/item/10106
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请 联系我