您的位置:首页 > 其它

HorizontalScrollView 水平滚动控件

2015-11-13 09:50 337 查看
HorizontalScrollView 控件支持水平滚动,而且在ScrollView中只能包含一个控件,通常是标签中定义了一个标签,然后在中放置多个控件。

案例代码:

这里写代码片


<?xml version="1.0" encoding="utf-8"?>
<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ying"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/jie"
/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/me"
/>

</LinearLayout>

</HorizontalScrollView>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: