小编use*_*993的帖子

如何将图像按钮中的图像拉伸到图像按钮的整个区域?

这张图片可以帮助您理解我的问题:

这是一个

我想把里面显示的图像拉伸ImageButton到整个区域ImageButton.正如您所看到的,数字1的图片只占大约95%,ImageButton你也可以看到它的边界ImageButton.

我还是想保持图像按钮的样式

这是我使用ImageView的方式:

<ImageButton
    android:id="@+id/secondActivityBbuttonDownRight"
    android:layout_width="0dip"
    android:layout_height="match_parent"
    android:layout_weight="0.5"
    android:scaleType="fitStart"
    android:src="@drawable/111" />
Run Code Online (Sandbox Code Playgroud)

我想我发现了我的问题.我需要一个只包含图像并具有单击效果的自定义组件.

android image stretch imagebutton

22
推荐指数
4
解决办法
3万
查看次数

标签 统计

android ×1

image ×1

imagebutton ×1

stretch ×1