Android图像按钮问题

时间:2010-04-26 10:47:47

标签: android icons imagebutton

我有以下imageButton

    <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 http://i42.tinypic.com/okts1k.png

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

1 个答案:

答案 0 :(得分:2)

  

任何人都知道如何制作图标   大。

制作一个更大的按钮。

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

欢迎您为不同的背景状态创建自定义的ImageButton背景和自定义九补丁PNG文件,您可以在其中调整九补丁控制框,以便在图标移动的位置之间留出较小的间隙和按钮的边缘。