Skip to main content

Posts

Showing posts from February, 2019

Android studio contoh penerapan looping

Berikut adalah contoh penerapan looping pada android studio, program akan melakukan looping sebanyak 10 kali dan mencetak angka dari 1 sampai 11 . Buka dan edit file activity_main.xml seperti berikut: activity_main.xml xml version= "1.0" encoding= "utf-8" ?> < RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android" xmlns: app = "http://schemas.android.com/apk/res-auto" xmlns: tools = "http://schemas.android.com/tools" android :layout_width= "match_parent" android :layout_height= "match_parent" tools :context= "daniyusuf.com.contohlooping.MainActivity" > < TextView android :id= "@+id/txt_looping" android :layout_width= "match_parent" android :layout_height= "wrap_content" android :text= "Hello World!" app :layout_constraintBottom_toBottomOf= "parent" ...