-1

I trying to create a full screen Imagebutton. But i kept getting grey border ard it.

<ImageButton
        android:id="@+id/StartButton"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"        
        android:src="@drawable/startscreen" />

I have try stretch the pic to full screen on eclipse but there still show a grey border around the picture.

I was wondering is that due to the resolution of my setting or the picture resolution. I am working on a galaxy note.

skaffman
  • 398,947
  • 96
  • 818
  • 769
  • Use ImageView and set a onclicklistener. check this out -> http://stackoverflow.com/questions/2283444/android-image-button – Proxy32 May 05 '12 at 17:41

2 Answers2

2

this should remove the grey border

<ImageButton
        android:id="@+id/StartButton"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"        
        android:src="@drawable/startscreen" 
        android:background="#000000"/>
Sunny Kumar Aditya
  • 2,806
  • 4
  • 26
  • 38
0

The idea of @Proxy32 is probably the best one. Alternatively don't use the android:src attribute but the android:background. You can also use a simple Button instead with the background set to your drawable and leave the text out.

WarrenFaith
  • 57,492
  • 25
  • 134
  • 150