You can specify padding inside the 9patch drawables you use for your button. You can take a look at Android's default graphics files (in frameworks/base/core/res/res/drawable-hdpi at android.git.kernel.org) to see how it's done. You can also use the draw9patch tool to test your padding.
On Wed, May 19, 2010 at 10:03 PM, Divkis <[email protected]> wrote: >> On May 19, 11:24 pm, skink <[email protected]> wrote: >> >> > when you use standard button drawables, they specify that extra >> > margins you are talking about, see btn_default*.* fIles under your sdk >> > root - btn_default.xml in particular which defines default Button >> > drawable >> >> I did have a look earlier at the btn_default.xml files as you >> suggested earlier as well, but even there I don't seem to find any xml >> tag for margins. It only lists the various kind of button image to use >> for different states of the button. > > Just to be sure that I am on the same page as you, my btn_default.xml > looks something like this, wherein I don't see any property for > margins: > > <selector xmlns:android="http://schemas.android.com/apk/res/android"> > <item android:state_window_focused="false" > android:state_enabled="true" > android:drawable="@drawable/btn_default_normal" /> > <item android:state_window_focused="false" > android:state_enabled="false" > android:drawable="@drawable/btn_default_normal_disable" /> > <item android:state_pressed="true" > android:drawable="@drawable/btn_default_pressed" /> > <item android:state_focused="true" android:state_enabled="true" > android:drawable="@drawable/btn_default_selected" /> > <item android:state_enabled="true" > android:drawable="@drawable/btn_default_normal" /> > <item android:state_focused="true" > android:drawable="@drawable/ > btn_default_normal_disable_focused" /> > <item > android:drawable="@drawable/btn_default_normal_disable" /> > </selector> > > Thanks & Regards, > DivKis > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

