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
Post a Comment