1 page.title= 2 @jd:body 3 4 <div id="qv-wrapper"> 5 <div id="qv"> 6 <h2></h2> 7 <ol> 8 <li><a href="providing-resources.html"> </a></li> 9 <li><a href="accessing-resources.html"> </a></li> 10 <li><a href="runtime-changes.html"> </a></li> 11 <li><a href="localization.html"></a></li> 12 </ol> 13 14 <h2></h2> 15 <ol> 16 <li><a href="available-resources.html"> </a></li> 17 </ol> 18 </div> 19 </div> 20 21 22 <p> 23 . 24 25 . Android 26 . 27 28 {@code res/} . 29 .</p> 30 31 <div class="figure" style="width:429px"> 32 <img src="{@docRoot}images/resources/resource_devices_diagram1.png" height="167" alt="" /> 33 <p class="img-caption"> 34 <strong> 1.</strong> 35 ( ).</p> 36 </div> 37 38 <div class="figure" style="width:429px"> 39 <img src="{@docRoot}images/resources/resource_devices_diagram2.png" height="167" alt="" /> 40 <p class="img-caption"> 41 <strong> 2.</strong> , 42 .</p> 43 </div> 44 45 <p> <em></em> 46 <em></em> .</p> 47 <ul> 48 <li> 49 50 .</li> 51 <li> 52 . , 53 .</li> 54 </ul> 55 56 <p> UI 57 {@code res/layout/} 58 . {@code res/layout-land/} 59 . Android 60 .</p> 61 62 <p> 1 63 . 2 64 .</p> 65 66 <p> , 67 , .</p> 68 69 <dl> 70 <dt><strong><a href="providing-resources.html"> </a></strong></dt> 71 <dd> , , 72 .</dd> 73 <dt><strong><a href="accessing-resources.html"> </a></strong></dt> 74 <dd> . 75 XML .</dd> 76 <dt><strong><a href="runtime-changes.html"> </a></strong></dt> 77 <dd> .</dd> 78 <dt><strong><a href="localization.html"></a></strong></dt> 79 <dd> . 80 , 81 .</dd> 82 <dt><strong><a href="available-resources.html"> </a></strong></dt> 83 <dd> , XML , 84 . , , 85 .</dd> 86 </dl> 87 88 <!-- 89 <h2>Raw Assets</h2> 90 91 <p>An alternative to saving files in {@code res/} is to save files in the {@code 92 assets/} directory. This should only be necessary if you need direct access to original files and 93 directories by name. Files saved in the {@code assets/} directory will not be given a resource 94 ID, so you can't reference them through the {@code R} class or from XML resources. Instead, you can 95 query data in the {@code assets/} directory like an ordinary file system, search through the 96 directory and 97 read raw data using {@link android.content.res.AssetManager}. For example, this can be more useful 98 when dealing with textures for a game. However, if you only need to read raw data from a file 99 (such as a video or audio file), then you should save files into the {@code res/raw/} directory and 100 then read a stream of bytes using {@link android.content.res.Resources#openRawResource(int)}. This 101 is uncommon, but if you need direct access to original files in {@code assets/}, refer to the {@link 102 android.content.res.AssetManager} documentation.</p> 103 --> 104