我告诉你,我有以下代码如何缩小图像(ImageView或ImageButton)而不丢失图像?
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/happy" />
但它是太大,我需要缩小它,但是当我做了以下情况
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="44dp"
android:layout_height="41dp"
android:src="@drawable/happy" />
您可以看到图像的某些部分丢失了,如何在没有这种情况的情况下收缩图像?
对于这个问题,在版面 –
+1中使用wieght,这个问题总是被很多人问起,也是一个令人困惑的问题,但是这个问题是可以解决的问题。 –