Home | History | Annotate | Download | only in samples
      1 page.title=Samples
      2 page.tags="samples","examples","code"
      3 
      4 @jd:body
      5 
      6 
      7 <p>Welcome to code samples for Android developers. Here you can browse sample code
      8   and learn how to build different components for your applications. Use the categories on the left
      9   to browse the available samples.</p>
     10 
     11 <p>Each sample is a fully functioning Android app. You can browse the resources, source files and
     12   see the overall project structure. You can copy and paste the code you need, and if you want to
     13   share a link to a specific line you can double-click it to the get the url.</p>
     14 
     15 <p>If you want to download a complete project, just click on any source file in the project and
     16   click the link in the upper right of the source page.</p>
     17 
     18 <p>To import a downloaded project:<p>
     19 
     20 <div class="toggle-content closed">
     21 <p style="margin-top:5px"><a href="#" onclick="return toggleContent(this)">
     22   <img src="/assets/images/triangle-closed.png" class="toggle-content-img" alt=""
     23   />Using Android Studio</a></p>
     24 
     25   <div class="toggle-content-toggleme">
     26 
     27   <ol>
     28     <li>Unpack the downloaded project package.</li>
     29     <li>In <a href="{@docRoot}sdk/installing/studio.html">Android Studio</a>, chose
     30     <strong>File > Import Project</strong> and select the root folder of the unpacked project.
     31       <p>Android Studio may ask you to choose the type of project you are importing.
     32         If this is the case, make sure to choose <strong>Import project from
     33         external model</strong> and select the <strong>Gradle</strong> option.
     34       </p>
     35     </li>
     36   </ol>
     37 
     38   </div>
     39 </div>
     40 
     41 <p class="note">
     42   <strong>Note:</strong> At this time, the downloadable projects are designed for use with Gradle
     43     and Android Studio. Project downloads for Eclipse will be available soon!
     44 </p>
     45 
     46