multi_path.xml revision 5ceb30f2164c745789c13bd0060e57fa8c04a8fd
1<?xml version="1.0" encoding="utf-8"?> 2 3<vector xmlns:android="http://schemas.android.com/apk/res/android" 4 android:height="76dp" 5 android:width="76dp" 6 android:viewportHeight="48" 7 android:viewportWidth="48"> 8 9 <group 10 android:name="root" 11 android:translateX="24.0" 12 android:translateY="24.0"> 13 <!-- 14 This is the same as the material indeterminate progressbar which involves drawing 15 several cubic segments 16 --> 17 <path 18 android:pathData="M0, 0 m 0, -19 a 19,19 0 1,1 0,38 a 19,19 0 1,1 0,-38" 19 android:strokeColor="#00FF00" 20 android:strokeLineCap="square" 21 android:strokeLineJoin="miter" 22 android:strokeWidth="1" 23 android:trimPathEnd="0.8" 24 android:trimPathStart="0.3" /> 25 <!-- Same figure with reversed end and start --> 26 <path 27 android:pathData="M0, 0 m 0, -12 a 19,19 0 1,1 0,38 a 19,19 0 1,1 0,-38" 28 android:strokeColor="#FFFF00" 29 android:strokeLineCap="square" 30 android:strokeLineJoin="miter" 31 android:strokeWidth="1" 32 android:trimPathEnd="0.3" 33 android:trimPathStart="0.8" /> 34 35 <!-- 36 Draw a few partial quadratic segments 37 --> 38 <path 39 android:strokeWidth="2" 40 android:strokeColor="#FFFF00" 41 android:pathData="M2,2 Q 5 30 15 0" 42 android:trimPathStart="0.1" 43 android:trimPathEnd="0.9" 44 /> 45 46 <!-- 47 Draw a line 48 --> 49 <path 50 android:strokeWidth="3" 51 android:strokeColor="#00FFFF" 52 android:pathData="M-10,-10 L 10, 10" 53 android:trimPathStart="0.2" 54 android:trimPathEnd="0.8" 55 /> 56 57 <!-- 58 Draw a line with gradient stroke color 59 --> 60 <path 61 android:strokeWidth="1" 62 android:strokeColor="#FF00FF" 63 android:fillColor="@color/gradient" 64 android:pathData="M-20,-20 l0, 10 l10, 0 l0, -10 l-10,0 " 65 /> 66 67 <!-- 68 Draw squares with different fill types 69 --> 70 <path 71 android:fillType="evenOdd" 72 android:strokeWidth="1" 73 android:strokeColor="#AABBCC" 74 android:fillColor="#AAEFCC" 75 android:pathData="M-20,-40 l0, 10 l10, 0 l0, -10 l-10,0 m5,0 l0, 10 l10, 0 l0, -10 l-10,0" 76 /> 77 78 <path 79 android:fillType="nonZero" 80 android:strokeWidth="1" 81 android:strokeColor="#AABBCC" 82 android:fillColor="#AAEFCC" 83 android:pathData="M0,-40 l0, 10 l10, 0 l0, -10 l-10,0 m5,0 l0, 10 l10, 0 l0, -10 l-10,0" 84 /> 85 </group> 86 87</vector>