blob: c1213b6bbc712ba6b41519097c61fa3557150685 [file] [log] [blame]
Dirk Doughertyb6bc0202013-07-09 13:18:15 -07001page.title=Samples
Joe Fernandezc779c012013-10-30 23:22:52 -07002page.tags="samples","examples","code"
3
Dirk Doughertyb6bc0202013-07-09 13:18:15 -07004@jd:body
5
Dirk Doughertyb6bc0202013-07-09 13:18:15 -07006
Joe Fernandezc779c012013-10-30 23:22:52 -07007<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
Joe Fernandez24807d72013-10-31 09:26:43 -070018<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
Joe Fernandezc779c012013-10-30 23:22:52 -070041<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