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"?><Shapexmlns:android= "Http://schemas.android.com/apk/res/android" > <SolidAndroid:color= "#fff"/> <paddingAndroid:top= "10px"Android:bottom= "10px"/> <CornersAndroid:radius= "16px"/> <StrokeAndroid: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"?><Shapexmlns:android= "Http://schemas.android.com/apk/res/android"Android:shape= "line" > <StrokeAndroid:dashgap= "3DP"Android:dashwidth= "8DP"Android:width= "1DP"Android:color= "#63a219" /> <sizeAndroid: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"?><Shapexmlns:android= "Http://schemas.android.com/apk/res/android" > <GradientAndroid:angle= "270.0"Android:endcolor= "#ffffff"Android:startcolor= "#000000" /></Shape>