document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  2.     xmlns:tools="http://schemas.android.com/tools"
  3.     android:layout_width="match_parent"
  4.     android:layout_height="match_parent"
  5.     android:gravity="center_horizontal"
  6.     tools:context=".MainActivity">
  7.  
  8.     <ScrollView
  9.         android:layout_width="wrap_content"
  10.         android:layout_height="wrap_content">
  11.  
  12.         <LinearLayout
  13.             android:layout_width="wrap_content"
  14.             android:layout_height="wrap_content"
  15.             android:gravity="center_horizontal"
  16.             android:orientation="vertical">
  17.  
  18.             <TextView
  19.                 android:layout_width="wrap_content"
  20.                 android:layout_height="wrap_content"
  21.                 android:text="Contoh Penerapan Widget Button Android " />
  22.  
  23.             <Button
  24.                 android:layout_width="wrap_content"
  25.                 android:layout_height="wrap_content"
  26.                 android:background="#f39c12"
  27.                 android:onClick="simpleButton"
  28.                 android:padding="10dp"
  29.                 android:text="Contoh Button Sederhana" />
  30.  
  31.             <Button
  32.                 android:layout_width="wrap_content"
  33.                 android:layout_height="wrap_content"
  34.                 android:layout_marginTop="10dp"
  35.                 android:background="#f39c12"
  36.                 android:drawableLeft="@android:drawable/sym_call_outgoing"
  37.                 android:onClick="leftIconButton"
  38.                 android:padding="10dp"
  39.                 android:text="Button dengan Icon dikiri" />
  40.  
  41.             <Button
  42.                 android:layout_width="wrap_content"
  43.                 android:layout_height="wrap_content"
  44.                 android:layout_marginTop="10dp"
  45.                 android:background="#f39c12"
  46.                 android:drawableRight="@android:drawable/sym_call_outgoing"
  47.                 android:onClick="rightIconButton"
  48.                 android:padding="10dp"
  49.                 android:text="Button dengan icon dikanan" />
  50.  
  51.             <Button
  52.                 android:layout_width="300dp"
  53.                 android:layout_height="80dp"
  54.                 android:layout_marginTop="10dp"
  55.                 android:background="@drawable/btn_img"
  56.                 android:onClick="backgroundImageButton"
  57.                 android:padding="10dp"
  58.                 android:text="Button dengan gambar latar" />
  59.  
  60.             <Button
  61.                 android:layout_width="250dp"
  62.                 android:layout_height="70dp"
  63.                 android:layout_marginTop="10dp"
  64.                 android:background="@drawable/btn_border"
  65.                 android:onClick="borderButton"
  66.                 android:padding="10dp"
  67.                 android:text="Button dengan Border Color" />
  68.  
  69.  
  70.         </LinearLayout>
  71.     </ScrollView>
  72. </LinearLayout>
');