Pemrograman Mobile Android 5 Komponen user interface pada
Pemrograman Mobile Android # 5 Komponen user interface pada Aplikasi Mobile ajib susanto fik Udinus 1
TIK n n Mahasiswa dapat menyebutkan beberapa komponen user interface pada aplikasi mobile. Mahasiswa mampu membuat desain tampilan aplikasi mobile, baik menggunakan GUI maupun XML. ajib susanto fik Udinus 2
UI Layout merupakan bagian yang mendefinisikan bagaimana keadaan view dalam aplikasi. n File layout defaultnya berada di direktori res/layouts. n ADT secara default akan membuat file main. xml pada direktori tersebut n ajib susanto fik Udinus 3
Linear. Layout yang menyusun bagian-bagiannya dalam satu baris n Linear. Layout ada 2 jenis : n q q n Linear. Layout (Vertical) Linear. Layout (Horizontal) Buka project atau buat project baru, klik di layout. ajib susanto fik Udinus 4
Linier. Layout#2 n Klik kanan pada layout default vertical ajib susanto fik Udinus 5
Linear. Layout#3 n Code XML ajib susanto fik Udinus 6
Linear. Layout#4 ajib susanto fik Udinus 7
Relative. Layout n n n Layout yang menampilkan elemen-elemen view dalam posisi relatif. Posisi dari sebuah view dapat diletakkan relatif terhadap posisi elemen view di sekitarnya atau relatif terhadap area layout utama. Sebuah desain tampilan aplikasi bisa dibuat lebih mudah dan sederhana menggunakan Relative. Layout dibandingkan dengan Linear. Layout. ajib susanto fik Udinus 8
Relative. Layout#2 n Buat file xml baru dengan nama relativelayout. xml. New XML ajib susanto fik Udinus 9
Relative. Layout#3 n File q n Root element : q n relativelayout Relative. Layout Klik Finish ajib susanto fik Udinus 10
Relative. Layout#4 n Edit relativelayout. xml ajib susanto fik Udinus 11
Table Layout n n Layout yang menampilkan elemen view dalam suatu posisi baris dan kolom dalam suatu representasi tabel. Bagi yang sudah pernah mempelajari HTML, penggunaan Table. Layout disini seperti penggunaan table dengan tag <table> dan <tr>. ajib susanto fik Udinus 12
Table Layout#2 ajib susanto fik Udinus 13
Input Control n Button, Text. Field, Check. Box, Radio Button, Spinner, Picker Scroll. View Liniear. Layout Textview Edit. View Spinner Date. Picker ajib susanto fik Udinus 14
Input Control Radio. Group Radio. Button Checkbox Button ajib susanto fik Udinus 15
Notification - Alert q Method set. Title() berguna untuk Setting Judul di alert dialog. q set. Message() digunakan untuk Setting pesan yang di tampilkan di alert dialog. q set. Icon() berguna untuk mengatur icon. ajib susanto fik Udinus 16
Notification - Alert ajib susanto fik Udinus 17
Methode dua. Alert ajib susanto fik Udinus 18
Methode tiga. Alert ajib susanto fik Udinus 19
Referensi n n n Felker. D. ; Dobbs J, 2011, Android Application Development For Dummies, Wiley Publishing Inc. , USA Official Android Developer Documentation http: //developer. android. com/. Esposito, Dino, Architecting Mobile Solutions for the Enterprise, 2012, O’Reilly Media. Iversen, Jakob & Eierman, Michael, Learning Mobile App Development A Hands-on Guide to Building Apps with i. OS and Android , 2014, Pearson Education. Meier, Reto, Professional Android 4 Application Development, 2012, John Wiley and Sons. Mc. Wherter, Jeff & Gowell, Scott, Professional Mobile Application Development, 2012, John Wiley & Sons ajib susanto fik Udinus 20
Ada Pertanyaan ? ajib susanto fik Udinus 21
Tugas 5 n Buat aplikasi form data diri ajib susanto fik Udinus 22
Ketentuan n n Gunakan Scroll. View agar form dapat di scroll atas bawah Kota menggunakan Spinner utk combo box Tanggal menggunakan datepicker Klik OK ada alert utk pemberitahuan yakin data di simpan OK, Cancel ajib susanto fik Udinus 23
Rehat Sejenak n n Berkeringat Big Package ajib susanto fik Udinus 24
- Slides: 24