Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/203.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 无法实现滚动视图_Android_Android Layout - Fatal编程技术网

Android 无法实现滚动视图

Android 无法实现滚动视图,android,android-layout,Android,Android Layout,我想对这些图像进行滚动查看。布局应该能够在垂直方向上滚动。我在线性布局中使用线性布局,但无法实现这一点。谁能告诉我如何解决这个问题。 <?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/scrollView1" android:layout_width="matc

我想对这些图像进行滚动查看。布局应该能够在垂直方向上滚动。我在线性布局中使用线性布局,但无法实现这一点。谁能告诉我如何解决这个问题。


<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/scrollView1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_gravity="center"
   >

    <RelativeLayout
        android:layout_width="318dp"
        android:layout_height="495dp"
         >
// Add Images here
    </RelativeLayout>

</ScrollView>
//在此处添加图像

使用相对布局…

使用如下滚动视图:

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
    <LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="bottom"
        android:orientation="horizontal" >

        <LinearLayout
            android:id="@+id/linearLayout1"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:gravity="bottom"
            android:orientation="horizontal" >

            <!-- your code goes here -->
            </LinearLayout>
       </LinearLayout>
</TableLayout>


A
ScrollView
只能包含一个子项。图像是静态的??