Monday, April 7, 2014

How to draw a "cross" in the layout?


How to draw a "cross" in the layout?

Just want a middle position in the layout of a vertical and horizontal cross into a "+" character
Please help
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
 xmlns: tools = "http://schemas.android.com/tools" 
android: layout_width = "match_parent"
android: layout_height = "match_parent"
tools: context = ". MainActivity">

android: layout_width = "1dp"
android: layout_height = "match_parent"
android: layout_gravity = "center"
android: background = "@ android: color / black" />

android: layout_width = "match_parent"
android: layout_height = "1dp"
android: layout_gravity = "center"
android: background = "@ android: color / black" />




Want to change the color on a whim android: background this property. Line height, width can be customized.

No comments:

Post a Comment