2011-07-13 77 views
4

我看到這個線程數,但沒有到底要我一直在尋找。Android的佈局和圖像按鈕和灰色的邊框

我有一個圖像按鈕奠定ontop的黑色背景。

圖像按鈕有一個巨大的灰色邊框。我試圖關閉邊框,並將邊框變成黑色......這不是工作。我只想讓按鈕在透明背景的屏幕上顯示,如果可能的話擴大一點。沒有灰色。

任何線索?

enter image description here

</LinearLayout> 
<LinearLayout android:layout_width="wrap_content" 
    style="@android:style/ButtonBar" android:layout_height="wrap_content" 
    android:orientation="vertical"> 

    <ImageButton android:layout_height="wrap_content" 
     android:src="@drawable/map" android:id="@+id/ImageButton1" 
     android:layout_width="fill_parent"> 
    </ImageButton> 

    <ImageButton android:layout_height="wrap_content" 
     android:src="@drawable/list" android:id="@+id/ImageButton2" 
     android:layout_width="fill_parent"> 
    </ImageButton> 

    <ImageButton android:layout_height="wrap_content" 
     android:src="@drawable/share" android:id="@+id/ImageButton3" 
     android:layout_width="fill_parent"> 
    </ImageButton> 

</LinearLayout> </LinearLayout> 
+0

你可以發送你想要什麼它看起來像什麼它看起來像現在屏幕截圖? – 2011-07-13 16:12:58

+0

我添加了一張圖片。對不起,我不知道我能做到這一點。你能看到這個問題嗎?我寧願我的按鈕更寬一些,灰色完全消失。另一種選擇是如果我可以把所有的按鈕放在一個橫條上。 –

回答

9

我想我知道你在說什麼。試試這個。你想包括android:background="@null"擺脫那灰色輪廓。

例如,在你的佈局,你聲明的ImageButton:

<ImageButton android:background="@null" ...> 
    . 
    . 
    . 
</ImageButton> 
+0

看到我上面的圖像。你認爲這仍然有效嗎? –

+0

是的,這應該擺脫圍繞三個按鍵的淺灰色​​的背景,不知道的深灰色之一。如果您需要進一步的幫助,您需要發佈您的佈局xml文件以獲得更好的外觀。 – Otra

+0

請參閱上面的代碼。 –