码迷,mamicode.com
首页 > 移动开发 > 详细

安卓学习-界面-ui-ScrollView和HorizontalScrollView

时间:2014-09-15 17:15:39      阅读:186      评论:0      收藏:0      [点我收藏+]

标签:android   style   blog   http   color   io   ar   for   2014   

添加滚动条

bubuko.com,布布扣

这里添加了两边的滚动条

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:scrollbarDefaultDelayBeforeFade="100000" >

        <HorizontalScrollView
            android:id="@+id/horizontalScrollView1"
            android:layout_width="match_parent"
            android:layout_height="match_parent" 
            android:scrollbarDefaultDelayBeforeFade="100000"
            >
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:orientation="horizontal" >
                <ImageView
                    android:id="@+id/imageView1"
                    android:layout_width="500dp"
                    android:layout_height="400dp"
                    android:src="@drawable/pic" />

            </LinearLayout>
        </HorizontalScrollView>

    </ScrollView>

</LinearLayout>

 

安卓学习-界面-ui-ScrollView和HorizontalScrollView

标签:android   style   blog   http   color   io   ar   for   2014   

原文地址:http://www.cnblogs.com/weijj/p/3972994.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!