Dirk Dougherty | b6bc020 | 2013-07-09 13:18:15 -0700 | [diff] [blame] | 1 | page.title=Samples |
Joe Fernandez | e26c4d2 | 2014-10-09 21:16:03 -0700 | [diff] [blame^] | 2 | page.tags="examples","code" |
Joe Fernandez | c779c01 | 2013-10-30 23:22:52 -0700 | [diff] [blame] | 3 | |
Dirk Dougherty | b6bc020 | 2013-07-09 13:18:15 -0700 | [diff] [blame] | 4 | @jd:body |
| 5 | |
Dirk Dougherty | b6bc020 | 2013-07-09 13:18:15 -0700 | [diff] [blame] | 6 | |
Joe Fernandez | c779c01 | 2013-10-30 23:22:52 -0700 | [diff] [blame] | 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 | |
Joe Fernandez | 24807d7 | 2013-10-31 09:26:43 -0700 | [diff] [blame] | 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 | |
Joe Fernandez | c779c01 | 2013-10-30 23:22:52 -0700 | [diff] [blame] | 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 | |