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

添加滚动条

这里添加了两边的滚动条

<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>

 

posted on 2014-09-15 15:56  weijj  阅读(162)  评论(0编辑  收藏  举报

导航