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="#ApplyTheme"></a></li> 10 <li><a href="#Layouts"></a></li> 11 <li><a href="#Depth"></a></li> 12 <li><a href="#ListsCards"></a></li> 13 <li><a href="#Animations"></a></li> 14 </ol> 15 <h2></h2> 16 <ul> 17 <li><a href="http://www.google.com/design/spec"></a></li> 18 <li><a href="{@docRoot}design/material/index.html">Android </a></li> 19 </ul> 20 </div> 21 </div> 22 23 24 <p></p> 25 26 <ol> 27 <li style="margin-bottom:10px"> 28 <a href="http://www.google.com/design/spec"></a></li> 29 <li style="margin-bottom:10px"> 30 <strong></strong></li> 31 <li style="margin-bottom:10px"> 32 <strong></strong></li> 33 <li style="margin-bottom:10px"> 34 <strong></strong></li> 35 <li style="margin-bottom:10px"> 36 <strong></strong></li> 37 <li style="margin-bottom:10px"> 38 <strong></strong></li> 39 </ol> 40 41 <h3></h3> 42 43 <p> Android 5.0 Android 44 45 <a href="{@docRoot}training/material/compatibility.html"></a></p> 46 47 <h3></h3> 48 49 <p> 50 51 </p> 52 53 <h3></h3> 54 55 <p><a href="http://www.google.com/design/spec"></a> 56 Android 57 </p> 58 59 60 <h2 id="ApplyTheme"></h2> 61 62 <p> 63 <code>android:Theme.Material</code> </p> 64 65 <pre> 66 <!-- res/values/styles.xml --> 67 <resources> 68 <!-- your theme inherits from the material theme --> 69 <style name="AppTheme" parent="android:Theme.Material"> 70 <!-- theme customizations --> 71 </style> 72 </resources> 73 </pre> 74 75 <p> 76 <a href="{@docRoot}training/material/theme.html"></a> 77 </p> 78 79 80 <h2 id="Layouts"></h2> 81 82 <p><a href="http://www.google.com/design/spec"></a> 83 84 </p> 85 86 <ul> 87 <li></li> 88 <li></li> 89 <li></li> 90 <li></li> 91 <li></li> 92 </ul> 93 94 95 <h2 id="Depth"></h2> 96 97 <p> 98 99 <code>android:elevation</code> </p> 100 101 <pre> 102 <TextView 103 android:id="@+id/my_textview" 104 android:layout_width="wrap_content" 105 android:layout_height="wrap_content" 106 android:text="@string/next" 107 android:background="@color/white" 108 android:elevation="5dp" /> 109 </pre> 110 111 <p> <code>translationZ</code> 112 <a href="{@docRoot}training/material/animations.html#ViewState"></a> 113 114 </p> 115 116 <p><a href="{@docRoot}training/material/shadows-clipping.html"></a> 117 </p> 118 119 120 <h2 id="ListsCards"></h2> 121 122 <p>{@link android.support.v7.widget.RecyclerView} {@link 123 android.widget.ListView} 124 {@link android.support.v7.widget.CardView} 125 126 {@link android.support.v7.widget.CardView} </p> 127 128 <pre> 129 <android.support.v7.widget.CardView 130 android:id="@+id/card_view" 131 android:layout_width="200dp" 132 android:layout_height="200dp" 133 card_view:cardCornerRadius="3dp"> 134 ... 135 </android.support.v7.widget.CardView> 136 </pre> 137 138 <p><a href="{@docRoot}training/material/lists-cards.html"></a> 139 </p> 140 141 142 <h2 id="Animations"></h2> 143 144 <p>Android 5.0API 21 API 145 146 </p> 147 148 <pre> 149 public class MyActivity extends Activity { 150 151 @Override 152 protected void onCreate(Bundle savedInstanceState) { 153 super.onCreate(savedInstanceState); 154 // enable transitions 155 getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS); 156 setContentView(R.layout.activity_my); 157 } 158 159 public void onSomeButtonClicked(View view) { 160 getWindow().setExitTransition(new Explode()); 161 Intent intent = new Intent(this, MyOtherActivity.class); 162 startActivity(intent, 163 ActivityOptions 164 .makeSceneTransitionAnimation(this).toBundle()); 165 } 166 } 167 </pre> 168 169 <p></p> 170 171 <p> API <a href="{@docRoot}training/material/animations.html"></a></p> 172