First on
Message_toolbar_left_bg_selector
<?xml version= "1.0" encoding= "Utf-8"? ><selector xmlns:android= "http://schemas.android.com/apk/res/ Android "> <item android:state_selected=" true "> <shape> <size android:width=" 69.0DP " android:height= "27DP"/> <!--line width, color gray---<stroke android:width= "0.5DP" Android:color = "@color/orange" ></stroke> < fillet radius of!--rectangle--<corners android:bottomleftradius= "10. 0DP "android:bottomrightradius=" 0.0DP "android:topleftradius=" 10.0DP "android:toprightradius=" 0.0DP "/> < Solid android:color= "@color/orange"/> </shape> </item> <item android:state_pressed= "true" & Gt <shape> <size android:width= "69.0DP" android:height= "27DP"/> <!--line width, color gray-- <stroke android:width= "0.5DP" android:color= "@color/orange" ></stroke> <!--rectangle fillet radius--& Gt <corners Android:bottomleftradius= "10.0DP" android:bottomrightradius= "0.0DP" android:topleftradius= "10.0DP" Android: toprightradius= "0.0DP"/> <solid android:color= "@color/orange"/> </shape> </ITEM&G T <item android:state_checked= "true" > <shape> <size android:width= "69.0DP" android:height= " 27DP "/> <!--line width, color gray--<stroke android:width=" 0.5DP "android:color=" @color/orange "& gt;</stroke> <!--Corner radius of Rectangle--<corners android:bottomleftradius= "10.0DP" Android:bott omrightradius= "0.0DP" android:topleftradius= "10.0DP" android:toprightradius= "0.0DP"/> <solid android:col Or= "@color/orange"/> </shape> </item> <item> <shape> <size A Ndroid:width= "69.0DP" android:height= "27DP"/> <!--line width, color gray---<stroke android:width= "0.5DP" android:color= "@color/oranGE "></stroke> <!--rounded radii of rectangles--<corners android:bottomleftradius=" 10.0DP "Android: bottomrightradius= "0.0DP" android:topleftradius= "10.0DP" android:toprightradius= "0.0DP"/> <solid Android : color= "@color/white"/></shape> </item></selector>
Message_toolbar_right_bg_selector
<?xml version= "1.0" encoding= "Utf-8"? ><selector xmlns:android= "http://schemas.android.com/apk/res/ Android "> <item android:state_selected=" true "> <shape> <size android:width=" 69.0DP " android:height= "27DP"/> <!--line width, color gray---<stroke android:width= "0.5DP" Android:color = "@color/orange" ></stroke> < fillet radius of!--rectangle--< Corner radius of!--rectangle--<cor Ners android:bottomleftradius= "0.0DP" android:bottomrightradius= "10.0DP" android:topleftradius= "0.0DP" Android: toprightradius= "10.0DP"/> <solid android:color= "@color/orange"/> </shape> </item& Gt <item android:state_pressed= "true" > <shape> <size android:width= "69.0DP" android:height= " 27DP "/> <!--line width, color gray--<stroke android:width=" 0.5DP "android:color=" @color/orange "& gt;</stroke> <!--rounded corners of rectanglesRadius-<!--corner radius of the rectangle-<corners android:bottomleftradius= "0.0DP" Android:bottomrightrad ius= "10.0DP" android:topleftradius= "0.0DP" android:toprightradius= "10.0DP"/> <solid android:color= "@colo R/orange "/> </shape> </item> <item android:state_checked=" true "> <shape> <size android:width= "69.0DP" android:height= "27DP"/> <!--line width, color gray---<s Troke android:width= "0.5DP" android:color= "@color/orange" ></stroke> < rounded corner radius of!--Rectangle-- <!--corner radius of the rectangle--<corners android:bottomleftradius= "0.0DP" android:bottomrightradius= "10.0DP" Android: topleftradius= "0.0DP" android:toprightradius= "10.0DP"/> <solid android:color= "@color/orange"/> </shape> </item> <item> <shape> <size android:width= "69.0DP" Android: height= "27DP"/> <!--line width, color gray--<stroke android:width= "0.5DP" android:color= "@color/orange" ></STROKE&G T <!--corner radius of the rectangle--<corners android:bottomleftradius= "0.0DP" android:bottomrightradius= "10.0DP" Android: topleftradius= "0.0DP" android:toprightradius= "10.0DP"/> <solid android:color= "@color/white"/> </shape> </item></selector>
Layout Interface
<radiogroup android:id= "@id/rg_group" android:layout_width= "138.0DP" Android:layout_h eight= "27.0DP" android:layout_centerinparent= "true" android:orientation= "Horizontal" > <radiobutton android:id= "@id/rbtn_message" android:layout_width= "Match_parent" android:layout_height= "Match_parent" android:layout_weight= "1" android:button= "@null" Android:checked= "true" android:gravity= "center" android:background= "@drawable/ Message_toolbar_left_bg_selector "android:text=" Heading 1 "android:textcolor=" @color/message_toolb Ar_font_color "/> <radiobutton android:id=" @id/rbtn_chat_room "Android:layo Ut_width= "Match_parent" android:layout_height= "Match_parent" android:layout_weight= "1" Android:button= "@null" android:gravity= "center" android:background= "@drawable/message_toolbar_right_bg_sel Ector "android:text=" Heading 2 "android:textcolor=" @color/message_toolbar_font_color "/> </RadioGroup>
Android Selector shape using