Dirk Dougherty | b6bc020 | 2013-07-09 13:18:15 -0700 | [diff] [blame] | 1 | page.title=Samples |
Joe Fernandez | c779c01 | 2013-10-30 23:22:52 -0700 | [diff] [blame] | 2 | page.tags="samples","examples","code" |
| 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 | |
| 18 | <p class="note"> |
| 19 | <strong>Note:</strong> At this time, the downloadable projects are designed for use with Gradle |
| 20 | and Android Studio. Project downloads for Eclipse will be available soon! |
| 21 | </p> |
| 22 | |
| 23 | <p>To import a downloaded project into <a href="{@docRoot}sdk/installing/studio.html">Android |
| 24 | Studio</a>:</p> |
| 25 | |
| 26 | <ul> |
| 27 | <li>Unpack the downloaded project package.</li> |
Joe Fernandez | 5780db1 | 2013-10-31 07:21:39 -0700 | [diff] [blame] | 28 | <li>In Android Studio, chose <strong>File > Import Project</strong> and select the root folder of |
Joe Fernandez | c779c01 | 2013-10-30 23:22:52 -0700 | [diff] [blame] | 29 | the unpacked project. |
| 30 | <p>Android Studio may ask you to choose the type of project you are importing. |
| 31 | If this is the case, make sure to choose <strong>Import project from |
Joe Fernandez | 5780db1 | 2013-10-31 07:21:39 -0700 | [diff] [blame] | 32 | external model</strong> and select the <strong>Gradle</strong> option. |
Joe Fernandez | c779c01 | 2013-10-30 23:22:52 -0700 | [diff] [blame] | 33 | </p> |
| 34 | </li> |
| 35 | </ul> |
| 36 | |
| 37 | |
Scott Main | 808eb3a | 2013-09-12 12:57:29 -0700 | [diff] [blame] | 38 | <div id="samples"> |
Dirk Dougherty | b6bc020 | 2013-07-09 13:18:15 -0700 | [diff] [blame] | 39 | </div> |