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"