Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Layout and Image Buttons and Grey Border

I have seen a few threads about this, but nothing exactly want I was looking for.

I have an image button that lays ontop a black background.

The image buttons have a huge grey border. I have tried to turn off border, and make the border black... It's not working out. I just want the buttons to be on the screen with a transparent background and expand a little wider if possible. NO GREY.

Any clue?

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>
like image 354
Stephen McClendon Avatar asked Jan 19 '23 05:01

Stephen McClendon


1 Answers

I think I know what you're talking about. Give this a try. You want to include android:background="@null" to get rid of that grey outline.

For instance, in your layout where you declare the ImageButton:

<ImageButton android:background="@null" ...>
    .
    .
    .
</ImageButton>
like image 165
Otra Avatar answered Jan 26 '23 00:01

Otra