1.9patch figure
2. Button customization
1 <?XML version= "1.0" encoding= "Utf-8"?>2 <Shapexmlns:android= "Http://schemas.android.com/apk/res/android">3 <!--Dimensions -4 <sizeAndroid:height= "20DP"Android:width= "310DP"/>5 <!--background Color "monochrome" fill -6 <SolidAndroid:color= "#f00"/>7 <!--Rounded Corners -8 <CornersAndroid:radius= "50DP"/>9 <!--Border -Ten <StrokeAndroid:color= "#09f"Android:width= "2DP"Android:dashgap= "2DP"Android:dashwidth= "15DP"/> One <!--background color Gradient fill - A <GradientAndroid:startcolor= "#5f913f"Android:centercolor= "#7575ab"Android:endcolor= "#cc1212"Android:angle= "$"/> - </Shape>
3. Customizing the button state
1 <?XML version= "1.0" encoding= "Utf-8"?>2 <selectorxmlns:android= "Http://schemas.android.com/apk/res/android">3 <!--Select State Change -4 <!--Click Status -5 <Itemandroid:drawable= "@drawable/b2"android:state_pressed= "true"/>6 <!--Normal State -7 <Itemandroid:drawable= "@drawable/b3"/>8 </selector>
Android Graphics Summary