gpt4 book ai didi

Android 图像按钮问题

转载 作者:行者123 更新时间:2023-11-29 22:34:09 26 4
gpt4 key购买 nike

我有以下图片按钮

    <ImageButton
android:id="@+id/header_buttonleft"
android:layout_width="40dip"
android:layout_height="40dip"
android:layout_alignParentLeft="true"
android:layout_marginLeft="10dip"
android:layout_marginTop="5dip"
android:src="@drawable/icon_download"
android:clickable="true"/>

但是当我在设备中加载我的应用程序时,它显得太小了:

alt text

任何人都知道如何使图标变大。我试图提高分辨率(实际上图标是 70x70),但它仍然不起作用。有什么想法吗?

最佳答案

Anyone knows how can i make the icon bigger.

做一个更大的按钮。

作为实验,从您的布局中删除 android:src,然后运行您的应用程序。这是最小的 ImageButton 可以在没有自定义背景的情况下。

欢迎您使用自定义九补丁 PNG 文件为不同的背景状态创建您自己的自定义 ImageButton 背景,您可以在其中调整九补丁控制框架以允许更小的间隙你的图标和按钮的边缘。

关于Android 图像按钮问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2712778/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com