Hello Inder, nice to see you here. :-) padding{Left,Top,Right,Bottom} is - like in CSS - within the bounds/border of the widget you apply it to.
You can use layout_margin{Left,Top,Right,Bottom} attributes to accomplish what you intend to do. Cheers, Christoph On Mon, Jan 26, 2009 at 5:55 PM, Inderjeet Singh <inder...@gmail.com> wrote: > > Hi, > > I am probably missing something totally obvious, but can someone tell > me how to add padding between buttons of a LinearLayout? > > Here is the code fragment from my layout xml file. > <LinearLayout > xmlns:android="http://schemas.android.com/apk/res/android" > android:orientation="horizontal" > android:gravity="center" > android:layout_width="fill_parent" > android:layout_height="wrap_content"> > > <Button android:id="@+id/first_button" > style="@style/ButtonText" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:paddingLeft="10px" > android:paddingRight="10px" > android:text="First"/> > > <Button android:id="@+id/second_button" > style="@style/ButtonText" > android:layout_width="wrap_content" > android:layout_height="wrap_content" > android:paddingLeft="10px" > android:paddingRight="10px" > android:text="Second"/> > </LinearLayout> > > The buttons still appear closer together than what I would prefer. How > do I increase the spacing between the "First" and "Second" buttons? > > Thanks > Inder > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---