android - How to set 4 button in centerHorizontal in Relative Layout -


I want to set 4 buttons in the horizontal center in the layout ... as if it is my screenshot!

This works for you:

  & lt; LinearLayout Xmlns: Android = "http://schemas.android.com/apk/res/android" xmlns: tools = "http://schemas.android.com/tools" Android: layout_width = "match_parent" Android: layout_height = "Match_perrent" Android: Gravity = "Center_Horizontal" Android: Orientation = "Horizontal" & gt; & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "1" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "2" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "3" /> & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "4" /> & Lt; / LinearLayout & gt;  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -