Android布局和图像按钮和灰色边框

Ste*_*don 4 android android-layout

我已经看到了一些关于这个问题的线索,但我并没有想要找到什么.

我有一个图像按钮,它位于黑色背景上.

图像按钮有一个巨大的灰色边框.我试图关闭边框,并使边框变黑......它没有用完.我只是希望按钮在屏幕上具有透明背景,并尽可能扩大一点.没有灰色.

任何线索?

在此输入图像描述

</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>
Run Code Online (Sandbox Code Playgroud)

Otr*_*tra 9

我想我知道你在谈论什么.试一试.你想要包括android:background="@null"摆脱那个灰色轮廓.

例如,在您声明ImageButton的布局中:

<ImageButton android:background="@null" ...>
    .
    .
    .
</ImageButton>
Run Code Online (Sandbox Code Playgroud)