我在制作android布局 时遇到问题,您可以在下面的图像中看到图像。本书的第四个图像进行自动调整,我需要往下移动时的布局完成后androidview中的imageview不会向下移动,只能水平扩展,因此一些图像不会显示
到目前为止我的代码是
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/backgroundmap"
android:isScrollContainer="true"
tools:context="com.example.adeel.freelancerproject.fileexpansion">
<ScrollView
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="150dp"
android:layout_height="match_parent"
android:id="@+id/fileshelf"
android:padding="10dp"
android:orientation="horizontal"
>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bluebook"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bluebook"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bluebook"/>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bluebook"/>
</LinearLayout>
</ScrollView>
</RelativeLayout>
基本上我需要修复布局的宽度完成后剩下的图像向下移动。 请帮忙 谢谢问候
您是否考虑过使用RecyclerView?看起来你想制作一个可滚动列表。 –