XML Control Configuration Properties
android:background= "@drawable/shape"
Label
Corners----------Rounded Corners
Gradient----------Gradients
Padding----------content distance from boundary
Size------------Sizes
Solid----------Fill Color
Stroke----------Strokes
Note that the Corners property is Bottomleftradius to the lower-right corner and Bottomrightradius to the lower-left corner.
Shape to make rounded corners
<button android:layout_width= "160DP" android:layout_height= "Wrap_content" Android:background= "@drawable/button_shape" android:text/>
<?XML version= "1.0" encoding= "Utf-8"?><ShapeXmlns:android= "Http://schemas.android.com/apk/res/android"><SolidAndroid:color= "#fff"/><padding android: Top= "10px" Android:bottom = "10px" /> << Span style= "color: #800000;" >corners android:radius= "16px" /> <stroke android:width= "1px" Android:color= "#000" /></>
Shape making dashed lines
Solid Line without Dashgap property
<View android:layout_width= "Match_parent" android:layout_height= "5px" Android:layout_margintop= "10DP" android:background/>
<?XML version= "1.0" encoding= "Utf-8"?><ShapeXmlns:android= "Http://schemas.android.com/apk/res/android" Android:shape=" line " > <stroke Android:dashgap= "3DP" Android:dashwidth= "8DP" Android:width=" 1DP " Android:color=" #63a219 " /> <size android:height= "1DP" /> </shape>
Shape making gradients
<View android:layout_width= "Match_parent" android:layout_height= "50DP" Android:layout_margintop= "10DP" android:background/>
<? XML version= "1.0" encoding= "Utf-8" ?><shape xmlns:android= "http://schemas.android.com/ Apk/res/android "> < gradient android:angle = "270.0" Android:endcolor = "#ffffff" Android:startcolor = "#000000" /></ shape>
Shape of android:res make fillets, dashes, gradients