0

I would like to know how to make the button which contains a kinda icon. I made up a LinearLayout first and the button belongs in it. I tried the the icon to be in the Button by using 'android:drawableLeft="@drawable/*" The icon was placed to too Left for me. The button is a little bit long and text and icon are small so there are some space empty. I mean, I want the icon to be more closer to the text than it was. Now, icon is placed to the left and text is in center. I want them to be together with a little padding.

I tried to use 'android:drawablePadding=7dip' but it didnt work. I so want somebody to let me know how to do it.

Have a good day. Thank you

SY Kwon
  • 159
  • 1
  • 2
  • 13

2 Answers2

1

You can use Custom Buttons are resizes button stretch image size and below link for custom Button Tutorial link

http://www.thesecretpie.com/2010/07/creating-custom-fancy-buttons-in.html

Thanks..!

Dinesh
  • 6,500
  • 10
  • 42
  • 77
0

There are two techniques. I suggest you look into:

  1. Image Buttons
  2. Image Views

With Image view you can create a button by using an onclick listener which can be created from within your activity or from your xml layout file.

ASceresini
  • 419
  • 3
  • 7