Difference between revisions of "Android Studio: Sample"

From OnnoWiki
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
Samples
+
Selamat Datang pada contoh kode untuk pengembang Android. Di sini Anda dapat menelusuri contoh kode dan belajar bagaimana membangun komponen yang berbeda untuk aplikasi Anda. Gunakan kategori di sebelah kiri untuk menelusuri sampel yang tersedia.
  
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.
+
Setiap sampel adalah aplikasi Android yang berfungsi penuh. Anda dapat menelusuri sumber daya, source file dan melihat struktur proyek secara keseluruhan. Anda dapat copy dan paste kode yang Anda butuhkan, dan jika Anda ingin berbagi link ke baris tertentu Anda dapat mengklik dua kali untuk mendapatkan URL.
  
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.
 
  
==Import Samples from GitHub==
+
==Import Sampel dari GitHub==
  
Android Studio provides easy access to import Android code samples from GitHub and is the recommended method to retrieve Android code samples.
+
Android Studio menyediakan akses mudah untuk mengimpor contoh source code Android dari GitHub dan merupakan metode yang direkomendasikan untuk mengambil contoh source code Android.
  
To import a code sample into Android Studio:
+
Untuk meng-import source code contoh ke Android Studio:
  
* In the Android Studio menu, select File > Import Sample to open the Import Sample wizard.
+
* Di menu Android Studio, pilih File > New > Import Sample untuk membuka Import Sample wizard.
* Select a sample to import and click Next.
+
* Pilih sampel yang akan di import dan click Next.
* Specify the application name and project location if different from the displayed settings.
+
* Tentukan nama aplikasi dan lokasi project jika berbeda dari setting yang ada.
* Click Finish.
+
* klik Finish.
  
The sample project opens in a new Android Studio project.
+
Contoh project akan dibuka di new Android Studio project.
  
Note: When starting Android Studio, you can also select Import an Android code sample in the Welcome to Android Studio wizard to import a sample project from GitHub as a new project.
+
Catatan: Ketika memulai Android Studio, Anda juga dapat memilih Impor contoh kode Android di Welcome to Android Studio wizard untuk mengimpor proyek sampel dari GitHub sebagai proyek baru.
  
For more information about importing samples, see Easy access to Android code samples on GitHub.
+
Untuk informasi lebih lanjut tentang mengimpor sampel, melihat bagian Easy access to Android code samples on GitHub.
  
 
==Download Samples==
 
==Download Samples==
  
Although importing samples from Android Studio is the recommended method, you can also use the categories on the left to browse the available samples and learn how to build different components for your applications.
+
Meskipun mengimpor sampel dari Android Studio adalah metode yang direkomendasikan, Anda juga dapat menggunakan kategori di sebelah kiri untuk menelusuri sampel yang tersedia dan belajar bagaimana membangun komponen yang berbeda untuk aplikasi Anda.
  
If you want to download a complete project, just click on any source file in the project and click the Download link in the upper right of the source page.
+
Jika Anda ingin men-download sebuah proyek lengkap, klik pada file sumber dalam proyek dan klik link Download di kanan atas halaman sumber.
  
To import a downloaded project:
+
Untuk meng-import sebuah downloaded project:
 
 
* Unpack the downloaded project package.
 
* In Android Studio, chose File > Import Project and select the root folder of the unpacked project.
 
 
 
Android Studio may ask you to choose the type of project you are importing. If this is the case, make sure to choose Import project from external model and select the Gradle option.
 
 
 
Note: When starting Android Studio, you can also select Import Non-Android Studio project in the Welcome to Android Studio wizard to import a downloaded sample project.
 
 
 
Note: At this time, the downloadable projects are designed for use with Gradle and Android Studio.
 
  
 +
* Unpack / buka downloaded project package.
 +
* Di Android Studio, pilih File > Import Project dan pilih root folder dari unpacked project.
  
 +
Android Studio akan meminta Anda untuk memilih jenis proyek yang anda impor. Jika hal ini terjadi, pastikan untuk memilih proyek Impor dari model yang eksternal dan pilih opsi Gradle.
  
 +
Catatan: Ketika memulai Android Studio, Anda juga dapat memilih Impor proyek Non-Android Studio di Welcome to Android Studio wizard untuk mengimpor proyek contoh hasil download.
  
 +
Catatan: Pada saat ini, proyek download dirancang untuk digunakan dengan Gradle dan Android Studio.
  
 
==Referensi==
 
==Referensi==
  
 
* http://developer.android.com/samples/index.html
 
* http://developer.android.com/samples/index.html

Latest revision as of 10:56, 11 October 2015

Selamat Datang pada contoh kode untuk pengembang Android. Di sini Anda dapat menelusuri contoh kode dan belajar bagaimana membangun komponen yang berbeda untuk aplikasi Anda. Gunakan kategori di sebelah kiri untuk menelusuri sampel yang tersedia.

Setiap sampel adalah aplikasi Android yang berfungsi penuh. Anda dapat menelusuri sumber daya, source file dan melihat struktur proyek secara keseluruhan. Anda dapat copy dan paste kode yang Anda butuhkan, dan jika Anda ingin berbagi link ke baris tertentu Anda dapat mengklik dua kali untuk mendapatkan URL.


Import Sampel dari GitHub

Android Studio menyediakan akses mudah untuk mengimpor contoh source code Android dari GitHub dan merupakan metode yang direkomendasikan untuk mengambil contoh source code Android.

Untuk meng-import source code contoh ke Android Studio:

  • Di menu Android Studio, pilih File > New > Import Sample untuk membuka Import Sample wizard.
  • Pilih sampel yang akan di import dan click Next.
  • Tentukan nama aplikasi dan lokasi project jika berbeda dari setting yang ada.
  • klik Finish.

Contoh project akan dibuka di new Android Studio project.

Catatan: Ketika memulai Android Studio, Anda juga dapat memilih Impor contoh kode Android di Welcome to Android Studio wizard untuk mengimpor proyek sampel dari GitHub sebagai proyek baru.

Untuk informasi lebih lanjut tentang mengimpor sampel, melihat bagian Easy access to Android code samples on GitHub.

Download Samples

Meskipun mengimpor sampel dari Android Studio adalah metode yang direkomendasikan, Anda juga dapat menggunakan kategori di sebelah kiri untuk menelusuri sampel yang tersedia dan belajar bagaimana membangun komponen yang berbeda untuk aplikasi Anda.

Jika Anda ingin men-download sebuah proyek lengkap, klik pada file sumber dalam proyek dan klik link Download di kanan atas halaman sumber.

Untuk meng-import sebuah downloaded project:

  • Unpack / buka downloaded project package.
  • Di Android Studio, pilih File > Import Project dan pilih root folder dari unpacked project.

Android Studio akan meminta Anda untuk memilih jenis proyek yang anda impor. Jika hal ini terjadi, pastikan untuk memilih proyek Impor dari model yang eksternal dan pilih opsi Gradle.

Catatan: Ketika memulai Android Studio, Anda juga dapat memilih Impor proyek Non-Android Studio di Welcome to Android Studio wizard untuk mengimpor proyek contoh hasil download.

Catatan: Pada saat ini, proyek download dirancang untuk digunakan dengan Gradle dan Android Studio.

Referensi