我在显示器上显示固定图像大小,因为它在标签中显示为正常,但在较小的屏幕上它保持原始大小。Android - 如何自动重新调整不同屏幕上的图像大小
我已经尝试不同的方法,但没有运气
I M发布XML请看看感谢
<LinearLayout
android:id="@+id/mainLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="1"
android:gravity="center"
android:orientation="vertical"
android:padding="10dp" >
<ImageView
android:id="@+id/Item1"
android:layout_alignParentTop="true"
android:layout_marginTop="100dip"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:src="@drawable/img_A1" />
</LinearLayout>
感谢您的帮助!
提供weightsum属性为您的线性布局,并给它价值100并给予重量您的ImageView的是50或60 。也给图像的高度为0 dp。 – Aakash 2015-04-05 01:09:07
在布局上显示良好,但不能根据需要在较小的屏幕手机上工作:( – Pooja 2015-04-05 01:23:32