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=" fillet button " />
<?xml version= "1.0" encoding= "Utf-8"? ><shape xmlns:android= "Http://schemas.android.com/apk/res/android" > <solid android:color= "#fff"/> <padding android:top= "10px" android:bottom= "10px"/> <corners android:radius= "16px"/> <stroke android:width= "1px" android:color= "#000"/></shape>
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= "@drawable/line_shape" />
<?xml version= "1.0" encoding= "Utf-8"? ><shape xmlns: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= "@drawable/gra_shape" />
<?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