Android 调整imageview的布局
我想调整应用程序的布局。 首先,我是安卓设计的新手。 我已经在滚动视图中进行了线性布局。 但是当调整布局时,图像之间会有很多空间。我想摆脱它 图像的宽度应与手机屏幕的宽度相等。高度必须自动调整 下面列出了xml代码。 如果问题不清楚,请评论我Android 调整imageview的布局,android,android-layout,android-studio,Android,Android Layout,Android Studio,我想调整应用程序的布局。 首先,我是安卓设计的新手。 我已经在滚动视图中进行了线性布局。 但是当调整布局时,图像之间会有很多空间。我想摆脱它 图像的宽度应与手机屏幕的宽度相等。高度必须自动调整 下面列出了xml代码。 如果问题不清楚,请评论我 <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/scrollView">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
tools:context=".MainActivity">
<ImageView
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:src="@drawable/sldr4" />
<ImageView
android:layout_height="wrap_content"
android:layout_width="fill_parent"
android:src="@drawable/sldr4" />
</LinearLayout>
</ScrollView>
您正在查找XML属性:
android:adjustViewBounds="true"