图像按钮仅显示一小块放大的图像。我不希望图像是全尺寸的。我想看全图,只是小一点。我该怎么做呢?我正在尝试制作数字市场类型的应用程序,例如 this .
最佳答案
试试这个。它肯定会起作用。
<ImageButton
android:id="@+id/img"
android:src="@drawable/img"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:maxWidth="100dp"
android:maxHeight="100dp"
android:scaleType="fitCenter"
android:layout_alignParentLeft="true"
android:contentDescription="@string/img"/>
关于安卓工作室 : Image Buttons Not Showing Full Image,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41268854/