9patch
Shape
Create
<?XML version= "1.0" encoding= "Utf-8"?><Shapexmlns:android= "Http://schemas.android.com/apk/res/android"> <!--Dimensions - <sizeAndroid:height= "50DP"Android:width= "100DP"/> <!--Monochrome Fill - <SolidAndroid:color= "#f00"/> <!--Rounded Corners - <CornersAndroid:radius= "50DP"/> <!--Border - <StrokeAndroid:color= "#0f0"Android:width= "5DP"Android:dashgap= "5DP"Android:dashwidth= "15DP"/> <!--Fade Color - <GradientAndroid:startcolor= "#0f0"Android:centercolor= "#f00"Android:endcolor= "#00f"Android:angle= "$"/></Shape>
Shape
Selector
<?XML version= "1.0" encoding= "Utf-8"?><selectorxmlns:android= "Http://schemas.android.com/apk/res/android"> <Itemandroid:drawable= "@drawable/abc"android:state_pressed= "true"android:state_checked= "true"/><!--when I press down,--><!--Show When selected - <Itemandroid:drawable= "@drawable/bcd"/></selector>
selector
<?XML version= "1.0" encoding= "Utf-8"?><selectorxmlns:android= "Http://schemas.android.com/apk/res/android"> <Itemandroid:drawable= "@drawable/abc"android:state_pressed= "true"/> <Itemandroid:state_checked= "false"android:drawable= "@drawable/bcd"/></selector>
Selectorcheck
<?XML version= "1.0" encoding= "Utf-8"?><selectorxmlns:android= "Http://schemas.android.com/apk/res/android"> <Itemandroid:state_pressed= "true"> <Shape> <SolidAndroid:color= "#f0f"/> <CornersAndroid:radius= "50DP"/> </Shape> </Item> <Item> <Shape> <SolidAndroid:color= "#f00"/> <CornersAndroid:radius= "10DP"/> </Shape> </Item></selector>
Selectorshape
Graphic -9patch,shape, selector