1 page.title= 2 3 @jd:body 4 5 <div id="tb-wrapper"> 6 <div id="tb"> 7 <h2></h2> 8 <ol> 9 <li><a href="#DrawableTint"> </a></li> 10 <li><a href="#ColorExtract"></a></li> 11 <li><a href="#VectorDrawables"></a></li> 12 </ol> 13 <h2></h2> 14 <ul> 15 <li><a href="http://www.google.com/design/spec"> </a></li> 16 <li><a href="{@docRoot}design/material/index.html">Android </a></li> 17 </ul> 18 </div> 19 </div> 20 21 <p> Drawable </p> 22 23 <ul> 24 <li></li> 25 <li></li> 26 <li></li> 27 </ul> 28 29 <p></p> 30 31 32 <h2 id="DrawableTint"> </h2> 33 34 <p>Android 5.0API 21 9-patch 35 <code>?android:attr/colorPrimary</code> 36 37 </p> 38 39 <p>{@code setTint()} {@link android.graphics.drawable.BitmapDrawable} {@link 40 android.graphics.drawable.NinePatchDrawable} <code>android:tint</code> 41 <code>android:tintMode</code> 42 </p> 43 44 45 <h2 id="ColorExtract"></h2> 46 47 <p>Android r21 {@link 48 android.support.v7.graphics.Palette} 49 </p> 50 51 <ul> 52 <li>Vibrant </li> 53 <li>Vibrant dark </li> 54 <li>Vibrant light </li> 55 <li>Muted </li> 56 <li>Muted dark </li> 57 <li>Muted light </li> 58 </ul> 59 60 <p> {@link android.graphics.Bitmap} 61 {@link android.support.v7.graphics.Palette#generate Palette.generate()} 62 63 {@link android.support.v7.graphics.Palette#generateAsync Palette.generateAsync()} 64 </p> 65 66 <p> 67 <code>Palette</code> <code>Palette.getVibrantColor</code> getter </p> 68 69 <p> {@link android.support.v7.graphics.Palette} 70 <a href="{@docRoot}sdk/installing/studio-build.html#dependencies">Gradle </a> 71 </p> 72 73 <pre> 74 dependencies { 75 ... 76 compile 'com.android.support:palette-v7:21.0.0' 77 } 78 </pre> 79 80 <p>API {@link android.support.v7.graphics.Palette} 81 </p> 82 83 84 <h2 id="VectorDrawables"></h2> 85 86 <!-- video box --> 87 <a class="notice-developers-video" href="https://www.youtube.com/watch?v=wlFVIIstKmA" style="margin-top:18px"> 88 <div> 89 <h3></h3> 90 <p>Android </p> 91 </div> 92 </a> 93 94 <p>Android 5.0API 21 95 1 96 <code><vector></code> XML 97 </p> 98 99 <p></p> 100 101 <pre> 102 <!-- res/drawable/heart.xml --> 103 <vector xmlns:android="http://schemas.android.com/apk/res/android" 104 <!-- intrinsic size of the drawable --> 105 android:height="256dp" 106 android:width="256dp" 107 <!-- size of the virtual canvas --> 108 android:viewportWidth="32" 109 android:viewportHeight="32"> 110 111 <!-- draw a path --> 112 <path android:fillColor="#8fff" 113 android:pathData="M20.5,9.5 114 c-1.955,0,-3.83,1.268,-4.5,3 115 c-0.67,-1.732,-2.547,-3,-4.5,-3 116 C8.957,9.5,7,11.432,7,14 117 c0,3.53,3.793,6.257,9,11.5 118 c5.207,-5.242,9,-7.97,9,-11.5 119 C25,11.432,23.043,9.5,20.5,9.5z" /> 120 </vector> 121 </pre> 122 123 <p>Android {@link android.graphics.drawable.VectorDrawable} 124 <code>pathData</code> <a href="http://www.w3.org/TR/SVG11/paths.html#PathData">SVG </a> 125 <a href="{@docRoot}training/material/animations.html#AnimVector"> </a> 126 </p> 127