java - Align the Button to center Background -
I need to align the background button. I need to output like an attached image button to all the blue background There should be a coalition in the center, not the logo.
& lt; Relative layout xmlns: Android = "http://schemas.android.com/apk/res/android" xmlns: tool = "http://schemas.android.com/tools" Android: layout_width = "match_parent" Android: layout_height = "Match_parent" Android: background = "@drawable / feedback_bg" & gt; & Lt; RelativeLayout Android: id = "@ + id / frame_title" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" & gt; & Lt; See Android: id = "@ + id / background" Android: layout_width = "match_parent" Android: layout_height = "75dp" Android: background = "@ drawable / topbluebar_and" /> & Lt; ImageView Android: ID = "@ + ID / Logo" Android: layout_width = "wrap_content" android: layout_height = "wrap_content" Android: background = "@ drawable / alrimal_top_logo" /> & Lt; Button Android: layout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_gravity = "center" android: layout_toRightOf = "@ id / logo" Android: text = "adfadf" /> & Lt; / RelativeLayout & gt; & Lt; / RelativeLayout & gt;
checkouts if it helps you
& lt; RelativeLayout 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_parent" Android: background = "@ Android: Color / Holo_blue_bright" & gt; & Lt; RelativeLayout Android: id = "@ + id / frame_title" Android: layout_width = "match_parent" Android: layout_height = "wrap_content" & gt; & Lt; Android: layout_height = "75dp" Android: Gravity = "center | center_vertical" Android: background = "@ + id / background" android: layout_width = "match_parent" android: layout_toRightOf = "@ + id / logo_linear" "@Android: Color / White" & gt; & Lt; Button Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: text = "adfadf" /> & Lt; Button Android: id = "@ + id / button1" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "button" /> & Lt; Android Android: id = "@ + id / button2" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" Android: text = "button" /> & Lt; / LinearLayout & gt; & Lt; LinearLayout Android: id = "@ + id / logo_linear" Android: layout_width = "wrap_content" Android: layout_height = "wrap_content" android: orientation = "vertical" & gt; & Lt; ImageView Android: ID = "@ + ID / Logo" Android: Layout_width = "100dp" Android: Layout_hett = "100 DP" Android: Background = "@ Drawable / Icon" /> & Lt; / LinearLayout & gt; & Lt; / RelativeLayout & gt; & Lt; / RelativeLayout & gt;
Comments
Post a Comment