Actually it depends on the container the Button is inside of. layout_margin* will work if the Button is inside a LinearLayout. When I add the Button widget dynamically (addView) to the TableRow is doesn't take effect.
To get margins I think I need to do button.setLayoutParams(myTableRowLayoutParams) On Apr 21, 4:21 pm, Mark Murphy <[email protected]> wrote: > Button most definitely supports android:layout_margin, > android:layout_marginTop, etc. > > On Thu, Apr 21, 2011 at 7:03 PM, jotobjects <[email protected]> wrote: > > I have a row of Buttons that are added dynamically to a TableRow in > > code. We are inserting space by creating Views to put between > > Buttons. Is there a lighter weight way to accomplish that? Button > > doesn't support margin and padding goes inside the button. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Training in London:http://bit.ly/smand1,http://bit.ly/smand2 -- 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

