2011-07-13 174 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

请参阅上面的代码。 –