1 page.title=TV 2 page.tags=tv, d-pad, focus 3 trainingnavtop=true 4 5 @jd:body 6 7 <div id="tb-wrapper"> 8 <div id="tb"> 9 <h2></h2> 10 <ol> 11 <li><a href="#d-pad-navigation"></a></li> 12 <li><a href="#focus-selection"></a></li> 13 </ol> 14 15 </div> 16 </div> 17 18 <p> 19 TV TV TV Android TV 20 </p> 21 22 <p> 23 TV 24 </p> 25 26 27 <h2 id="d-pad-navigation"></h2> 28 29 <p> 30 TV TV 31 </p> 32 33 <p> 34 Android TV 35 </p> 36 37 <ul> 38 <li> 39 </li> 40 <li>[] 41 </li> 42 <li> 43 </li> 44 </ul> 45 46 47 <h3 id="modify-d-pad-nav"></h3> 48 49 <p> 50 Android TV 51 </p> 52 53 <p class="note"> 54 <strong>:</strong> 55 </p> 56 57 <p> 58 {@link android.widget.TextView} 59 </p> 60 61 <pre> 62 <TextView android:id="@+id/Category1" 63 android:nextFocusDown="@+id/Category2"\> 64 </pre> 65 66 <p> 67 Android 68 </p> 69 70 <table> 71 <tr> 72 <th></th> 73 <th></th> 74 </tr> 75 <tr> 76 <td>{@link android.R.attr#nextFocusDown}</td> 77 <td></td> 78 </tr> 79 <tr> 80 <td>{@link android.R.attr#nextFocusLeft}</td> 81 <td></td> 82 </tr> 83 <tr> 84 <td>{@link android.R.attr#nextFocusRight}</td> 85 <td></td> 86 </tr> 87 <tr> 88 <td>{@link android.R.attr#nextFocusUp}</td> 89 <td></td> 90 </tr> 91 </table> 92 93 <p> 94 ID {@code android:id} 95 </p> 96 97 98 99 <h2 id="focus-selection"></h2> 100 101 <p> 102 TV 103 </p> 104 105 <p> 106 107 </p> 108 109 <p> 110 Android <a href="{@docRoot}guide/topics/resources/drawable-resource.html#StateList"> </a> 111 </p> 112 113 <pre> 114 <!-- res/drawable/button.xml --> 115 <?xml version="1.0" encoding="utf-8"?> 116 <selector xmlns:android="http://schemas.android.com/apk/res/android"> 117 <item android:state_pressed="true" 118 android:drawable="@drawable/button_pressed" /> <!-- pressed --> 119 <item android:state_focused="true" 120 android:drawable="@drawable/button_focused" /> <!-- focused --> 121 <item android:state_hovered="true" 122 android:drawable="@drawable/button_focused" /> <!-- hovered --> 123 <item android:drawable="@drawable/button_normal" /> <!-- default --> 124 </selector> 125 </pre> 126 127 <p> 128 XML {@link android.widget.Button} 1 129 </p> 130 131 <pre> 132 <Button 133 android:layout_height="wrap_content" 134 android:layout_width="wrap_content" 135 android:background="@drawable/button" /> 136 </pre> 137 138 <p> 139 140 </p> 141 142 <p> 143 TV <a href="{@docRoot}design/tv/patterns.html">TV </a> 144 </p> 145