2013-07-09 13:18:15 -07:00
|
|
|
page.title=Samples
|
2013-10-30 23:22:52 -07:00
|
|
|
page.tags="samples","examples","code"
|
|
|
|
|
2013-07-09 13:18:15 -07:00
|
|
|
@jd:body
|
|
|
|
|
|
|
|
|
2013-10-30 23:22:52 -07:00
|
|
|
<p>Welcome to code samples for Android developers. Here you can browse sample code
|
|
|
|
and learn how to build different components for your applications. Use the categories on the left
|
|
|
|
to browse the available samples.</p>
|
|
|
|
|
|
|
|
<p>Each sample is a fully functioning Android app. You can browse the resources, source files and
|
|
|
|
see the overall project structure. You can copy and paste the code you need, and if you want to
|
|
|
|
share a link to a specific line you can double-click it to the get the url.</p>
|
|
|
|
|
|
|
|
<p>If you want to download a complete project, just click on any source file in the project and
|
|
|
|
click the link in the upper right of the source page.</p>
|
2013-07-09 13:18:15 -07:00
|
|
|
|
2013-10-30 23:22:52 -07:00
|
|
|
<p class="note">
|
|
|
|
<strong>Note:</strong> At this time, the downloadable projects are designed for use with Gradle
|
|
|
|
and Android Studio. Project downloads for Eclipse will be available soon!
|
|
|
|
</p>
|
2013-07-09 13:18:15 -07:00
|
|
|
|
2013-10-30 23:22:52 -07:00
|
|
|
<p>To import a downloaded project into <a href="{@docRoot}sdk/installing/studio.html">Android
|
|
|
|
Studio</a>:</p>
|
|
|
|
|
|
|
|
<ul>
|
|
|
|
<li>Unpack the downloaded project package.</li>
|
2013-10-31 07:21:39 -07:00
|
|
|
<li>In Android Studio, chose <strong>File > Import Project</strong> and select the root folder of
|
2013-10-30 23:22:52 -07:00
|
|
|
the unpacked project.
|
|
|
|
<p>Android Studio may ask you to choose the type of project you are importing.
|
|
|
|
If this is the case, make sure to choose <strong>Import project from
|
2013-10-31 07:21:39 -07:00
|
|
|
external model</strong> and select the <strong>Gradle</strong> option.
|
2013-10-30 23:22:52 -07:00
|
|
|
</p>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="samples">
|
|
|
|
</div>
|