Android shape xml file, androidshapexml
The xml file of Android shape can be used to write different shapes, backgrounds, borders, rounded corners, and other effects. It can be used to reduce the size of the resource file by replacing many. 9 images. Next, let's take a look at what shape can contain.
1 <?xml version="1.0" encoding="utf-8"?> 2 <shape 3 xmlns:android="http://schemas.android.com/apk/res/android" 4 android:shape=["rectangle" | "oval" | "line" | "ring"] > 5 <corners 6 android:radius="integer" 7 android:topLeftRadius="integer" 8 android:topRightRadius="integer" 9 android:bottomLeftRadius="integer"10 android:bottomRightRadius="integer" />11 <gradient12 android:angle="integer"13 android:centerX="integer"14 android:centerY="integer"15 android:centerColor="integer"16 android:endColor="color"17 android:gradientRadius="integer"18 android:startColor="color"19 android:type=["linear" | "radial" | "sweep"]20 android:useLevel=["true" | "false"] />21 <padding22 android:left="integer"23 android:top="integer"24 android:right="integer"25 android:bottom="integer" />26 <size27 android:width="integer"28 android:height="integer" />29 <solid30 android:color="color" />31 <stroke32 android:width="integer"33 android:color="color"34 android:dashWidth="integer"35 android:dashGap="integer" />36 </shape>