如果不放置ScrollView,则不会出现滚动操作,没有滚动条,这个是必须添加的。
简化的xml布局文件:
- <?xml version="1.0" encoding="utf-8"?>
- <LinearLayout>
- <LinearLayout>
- <ImageView />
- <TextView />
- </LinearLayout>
- <LinearLayout>
- <TextView />
- <TextView />
- </LinearLayout>
- <LinearLayout>
- <TextView />
- </LinearLayout>
- <ScrollView android:layout_weight="1">
- <LinearLayout>
- <ImageView />
- <TextView />
- </LinearLayout>
- </ScrollView>
- </LinearLayout>