{"action":"created","issue":{"url":"https://api.github.com/repos/fightercode/Basic-Intent-Beginner/issues/1","repository_url":"https://api.github.com/repos/fightercode/Basic-Intent-Beginner","labels_url":"https://api.github.com/repos/fightercode/Basic-Intent-Beginner/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/fightercode/Basic-Intent-Beginner/issues/1/comments","events_url":"https://api.github.com/repos/fightercode/Basic-Intent-Beginner/issues/1/events","html_url":"https://github.com/fightercode/Basic-Intent-Beginner/issues/1","id":371350725,"node_id":"MDU6SXNzdWUzNzEzNTA3MjU=","number":1,"title":"Intent Explicit | Beginner","user":{"login":"fightercode","id":40706995,"node_id":"MDQ6VXNlcjQwNzA2OTk1","avatar_url":"https://avatars2.githubusercontent.com/u/40706995?v=4","gravatar_id":"","url":"https://api.github.com/users/fightercode","html_url":"https://github.com/fightercode","followers_url":"https://api.github.com/users/fightercode/followers","following_url":"https://api.github.com/users/fightercode/following{/other_user}","gists_url":"https://api.github.com/users/fightercode/gists{/gist_id}","starred_url":"https://api.github.com/users/fightercode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fightercode/subscriptions","organizations_url":"https://api.github.com/users/fightercode/orgs","repos_url":"https://api.github.com/users/fightercode/repos","events_url":"https://api.github.com/users/fightercode/events{/privacy}","received_events_url":"https://api.github.com/users/fightercode/received_events","type":"User","site_admin":false},"labels":[{"id":1095281138,"node_id":"MDU6TGFiZWwxMDk1MjgxMTM4","url":"https://api.github.com/repos/fightercode/Basic-Intent-Beginner/labels/Intent%20Beginner","name":"Intent Beginner","color":"4deada","default":false},{"id":1095281509,"node_id":"MDU6TGFiZWwxMDk1MjgxNTA5","url":"https://api.github.com/repos/fightercode/Basic-Intent-Beginner/labels/Materi","name":"Materi","color":"b22e32","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-18T03:48:17Z","updated_at":"2018-10-24T02:15:03Z","closed_at":null,"author_association":"OWNER","body":"## Bag. 1: Mengenal & Menggunakan Intent Explicit Android\r\n**Intent Eksplisit** menetapkan komponen untuk memulai dengan nama ( nama kelas yang sepenuhnya memenuhi syarat). Anda biasanya akan menggunakan Intent eksplisit untuk memulai sebuah komponen dalam aplikasi sendiri, karena Anda mengetahui nama kelas dari aktivitas atau layanan yang ingin dimulai. Misalnya, mulai aktivitas baru sebagai respons terhadap aksi pengguna atau mulai layanan untuk mengunduh file di latar belakang.\r\n\r\n![image](https://user-images.githubusercontent.com/40706995/47129958-aabf8780-d2c1-11e8-879f-979828ab94ca.png)\r\n\r\nSederhananya adalah misal kita ingin membuat sebuah splashscreen dan berpindah ke halaman menu utama dari aplikasi android kita seperti pada gambar dibawah ini\r\n\r\n![image](https://user-images.githubusercontent.com/40706995/47130040-01c55c80-d2c2-11e8-8389-1a982dac1f7e.png)\r\n\r\n### Cara Bag. 1: Intent Explicit\r\nPenggunaan dasar untuk mengakses aktifitas lain dengan menggunakan Intent Explicit adalah sebagai berikut:\r\n```\r\nIntent nameOfIntent = new Intent(Activity1.this, Activity2.class);\r\nstartActivity(nameOfIntent);\r\n```\r\n\r\n### Cara Bag. 2: Intent Explicit\r\n```\r\nstartActivity(new Intent(Activity1.this, Activity2.class));\r\n```"},"comment":{"url":"https://api.github.com/repos/fightercode/Basic-Intent-Beginner/issues/comments/432487099","html_url":"https://github.com/fightercode/Basic-Intent-Beginner/issues/1#issuecomment-432487099","issue_url":"https://api.github.com/repos/fightercode/Basic-Intent-Beginner/issues/1","id":432487099,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjQ4NzA5OQ==","user":{"login":"fightercode","id":40706995,"node_id":"MDQ6VXNlcjQwNzA2OTk1","avatar_url":"https://avatars2.githubusercontent.com/u/40706995?v=4","gravatar_id":"","url":"https://api.github.com/users/fightercode","html_url":"https://github.com/fightercode","followers_url":"https://api.github.com/users/fightercode/followers","following_url":"https://api.github.com/users/fightercode/following{/other_user}","gists_url":"https://api.github.com/users/fightercode/gists{/gist_id}","starred_url":"https://api.github.com/users/fightercode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fightercode/subscriptions","organizations_url":"https://api.github.com/users/fightercode/orgs","repos_url":"https://api.github.com/users/fightercode/repos","events_url":"https://api.github.com/users/fightercode/events{/privacy}","received_events_url":"https://api.github.com/users/fightercode/received_events","type":"User","site_admin":false},"created_at":"2018-10-24T02:15:03Z","updated_at":"2018-10-24T02:15:03Z","author_association":"OWNER","body":"# Bag. 3.1: Lanjutan, Membuat Sesi Action Proses\r\nDalam sebuah aksi pasti membutuhkan sebuah **proses** misalkan seperti menekan tombol `Button` pada aplikasi ingin mengalihkannya ke halaman lain, atau ingin mengakses web dan lain sebagainya, maka dari itu semua user harus membuat deskripsi dari proses yang akan dilakukan oleh program.\r\n\r\n![image](https://user-images.githubusercontent.com/40706995/47401459-b4d30180-d76b-11e8-896c-2036702fdba3.png)\r\n\r\n## Part 3: Documentation Best Practice\r\nUntuk action Klik sendiri ada beberapa macam cara yaitu sebagai berikut dalam dokumentasi action proses Button ini. yaitu **`onClick`** dan **`setOnClickListener`**\r\n\r\n#### Pembahasan 1: Membuat Action dengan onClick\r\nBerikut adalah sumber dari [onClick Android Developer](https://developer.android.com/guide/topics/ui/controls/button) dalam Dokumentasinya memaparkan bagaimana cara menggunakan onClick Atribut ini\r\n\r\n![image](https://user-images.githubusercontent.com/40706995/47401689-8bff3c00-d76c-11e8-8877-f60ef1e0eb6a.png)\r\n\r\ndan kemudian untuk implementasi proses dalam class java adalah sebagai berikut:\r\n\r\n![image](https://user-images.githubusercontent.com/40706995/47401748-cff24100-d76c-11e8-8b11-c5dbb00a8052.png)\r\n\r\n#### Pembahasan 2: Membuat Action dengan setOnClickListener\r\n**Berbeda dengan proses `onClick`** listener kita `tidak perlu menggunakan/menambahkan` lagi `Atribut onClick pada View` yang dimaksudkan kita `hanya perlu memberikan ID pada view` kemudian `deklarasikan, implementasi dan buat Actionnya`, dan untuk proses `setOnClickListener` adalah sebagai berikut\r\n\r\n![image](https://user-images.githubusercontent.com/40706995/47401894-47c06b80-d76d-11e8-9594-39482a580057.png)\r\n"}}
{"actor":{"display_login":"fightercode"}}