2010-04-26 60 views
1

我有以下的ImageButtonAndroid的圖片按鈕問題

<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),但它仍然不起作用。任何想法?

回答

2

任何人都知道如何讓圖標 變大。

做一個更大的按鈕。

作爲一個實驗,從您的佈局中刪除android:src,然後運行您的應用程序。那就是最小的ImageButton可以沒有自定義背景。

歡迎您爲自己的自定義ImageButton背景使用不同背景狀態的自定義九段式PNG文件,您可以在其中調整九段式控制幀,以便在圖標所在的位置與邊緣的按鈕。

+0

已解決。問題是文件夾可繪製 - hdpi,mdpi ... 我把圖標放在文件夾hdpi,而不是mdpi。 謝謝 – xger86x 2010-04-30 09:46:19