i have bunch of buttons within linear layout. But there is spaces buttons. I set padding as 0 but there no change. There is someone who already had the same problem at http://www.mail-archive.com/[email protected]/msg51104.html but no answer at there. Can you plese help me.
Try to play with android:layout_margin
attribute. For instance, to reduce space on the left/right side (assuming you have a horizontal set of buttons) you can do smth like this:
<Button
android:layout_marginLeft="-3dip"
android:layout_marginRight="-3dip"
... />
I'll refer you to a previous answer I gave on this:
If you're meaning you want them to be pushed to the edge, pixel for pixel, you'll need to use your own 9-patch for the button background, as the default one in Android has a few extra pixels around the border of its 9-patch background. For an example of this, look at the file in your SDK folder under:
platforms/android-8/data/res/drawable-hdpi/btn_default_transparent_normal.9.png
For example, this is what I get with the default:
And with a custom 9-patch I had made earlier:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With