Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/226.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 - Fatal编程技术网

Android调整图像大小以适应屏幕大小

Android调整图像大小以适应屏幕大小,android,Android,我在安卓系统中有一个ImageView从URL加载图像,加载的图像大小是500*500。 当图像加载到一个小屏幕上时,它适合屏幕的所有宽度,高度是可以接受的。然而,在大屏幕上,图像变得非常非常小,为什么?我怎样才能解决这个问题 <ImageView android:id="@+id/items_image" android:layout_width="wrap_content" android:layout_height="wrap_content" and

我在安卓系统中有一个
ImageView
从URL加载图像,加载的图像大小是500*500。 当图像加载到一个小屏幕上时,它适合屏幕的所有宽度,高度是可以接受的。然而,在大屏幕上,图像变得非常非常小,为什么?我怎样才能解决这个问题

<ImageView
    android:id="@+id/items_image"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@+id/items_name"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="50dp"
    android:adjustViewBounds="true"
    android:scaleType="fitXY"
    android:src="@drawable/cross_blank" />

根据您的布局,更改为

android:layout_width="match_parent"
android:layout_height="wrap_content"


尝试将宽度和高度更改为

android:layout_width="fill_parent"
android:layout_height="fill parent"

然后将您的
ImageView
放入
线性布局中
,并将布局的宽度和高度也设置为
fill\u parent

您可以共享两个屏幕和整个xml的屏幕截图吗?问题可能在包含布局中。
android:layout_width="fill_parent"
android:layout_height="fill parent"