首页 > 系统 > Android > 正文

Android实现Activity水平和垂直滚动条的方法

2019-10-23 20:33:13
字体:
来源:转载
供稿:网友

本文实例讲述了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开发频道。
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表