Advertisement
Guest User

example_radio_group_dan_radio_button.xml

a guest
Jul 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 3.77 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:id="@+id/linear_layout"
  6.    android:layout_width="match_parent"
  7.    android:layout_height="match_parent"
  8.    android:orientation="vertical"
  9.    android:padding="16dp"
  10.    tools:context="com.ysn.iakbeginner.MainActivity">
  11.  
  12.     <TextView
  13.        android:layout_width="wrap_content"
  14.        android:layout_height="wrap_content"
  15.        android:layout_gravity="center_horizontal"
  16.        android:text="BIODATA DIRI"
  17.        android:textSize="16sp"
  18.        android:textStyle="bold" />
  19.  
  20.     <ImageView
  21.        android:layout_width="36dp"
  22.        android:layout_height="36dp"
  23.        android:src="@drawable/ic_account_circle_darker_gray_24dp"
  24.        android:layout_gravity="center_horizontal"
  25.        />
  26.  
  27.     <TextView
  28.        android:layout_width="wrap_content"
  29.        android:layout_height="wrap_content"
  30.        android:layout_marginTop="16dp"
  31.        android:text="Nama" />
  32.  
  33.     <EditText
  34.        android:layout_width="match_parent"
  35.        android:layout_height="wrap_content"
  36.        android:inputType="textPersonName" />
  37.  
  38.     <TextView
  39.        android:layout_width="wrap_content"
  40.        android:layout_height="wrap_content"
  41.        android:layout_marginTop="16dp"
  42.        android:text="Tanggal Lahir" />
  43.  
  44.     <EditText
  45.        android:layout_width="match_parent"
  46.        android:layout_height="wrap_content"
  47.        android:inputType="date" />
  48.  
  49.     <TextView
  50.        android:layout_width="wrap_content"
  51.        android:layout_height="wrap_content"
  52.        android:layout_marginTop="16dp"
  53.        android:text="Agama" />
  54.  
  55.     <RadioGroup
  56.        android:layout_width="wrap_content"
  57.        android:layout_height="wrap_content"
  58.        android:orientation="horizontal"
  59.        >
  60.  
  61.         <RadioButton
  62.            android:layout_width="wrap_content"
  63.            android:layout_height="wrap_content"
  64.            android:text="Islam"
  65.            />
  66.  
  67.         <RadioButton
  68.            android:layout_width="wrap_content"
  69.            android:layout_height="wrap_content"
  70.            android:text="Kristen"
  71.            android:layout_marginLeft="13dp"
  72.            />
  73.  
  74.         <RadioButton
  75.            android:layout_width="wrap_content"
  76.            android:layout_height="wrap_content"
  77.            android:text="Hindu"
  78.            android:layout_marginLeft="13dp"
  79.            />
  80.  
  81.     </RadioGroup>
  82.  
  83.     <TextView
  84.        android:layout_width="wrap_content"
  85.        android:layout_height="wrap_content"
  86.        android:layout_marginTop="16dp"
  87.        android:text="Hobi" />
  88.  
  89.     <EditText
  90.        android:layout_width="match_parent"
  91.        android:layout_height="wrap_content"
  92.        android:inputType="text" />
  93.  
  94.     <TextView
  95.        android:layout_width="wrap_content"
  96.        android:layout_height="wrap_content"
  97.        android:layout_marginTop="16dp"
  98.        android:text="No. HP" />
  99.  
  100.     <EditText
  101.        android:layout_width="match_parent"
  102.        android:layout_height="wrap_content"
  103.        android:inputType="phone" />
  104.  
  105.     <LinearLayout
  106.        android:layout_width="match_parent"
  107.        android:layout_height="wrap_content"
  108.        android:orientation="horizontal">
  109.  
  110.         <Button
  111.            android:layout_width="match_parent"
  112.            android:layout_height="wrap_content"
  113.            android:layout_weight="1"
  114.            android:text="Simpan" />
  115.  
  116.         <Button
  117.            android:layout_width="match_parent"
  118.            android:layout_height="wrap_content"
  119.            android:layout_weight="1"
  120.            android:text="Batal"
  121.            />
  122.  
  123.     </LinearLayout>
  124.  
  125. </LinearLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement