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
只能包含一个子项。图像是静态的??