Advertisement
wildanfuady

Activity Form

Jan 13th, 2020
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.80 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  3. android:layout_width="match_parent"
  4. android:layout_height="match_parent">
  5.  
  6. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  7. xmlns:app="http://schemas.android.com/apk/res-auto"
  8. xmlns:tools="http://schemas.android.com/tools"
  9. android:layout_width="match_parent"
  10. android:layout_height="match_parent"
  11. android:orientation="vertical"
  12. android:padding="8dp"
  13. tools:context=".FormActivity3">
  14.  
  15. <LinearLayout
  16. android:layout_width="match_parent"
  17. android:layout_height="wrap_content"
  18. android:layout_marginTop="16dp"
  19. android:layout_marginBottom="8dp"
  20. android:orientation="horizontal">
  21.  
  22. <EditText
  23. android:id="@+id/inputNamaDepan"
  24. android:layout_width="0dp"
  25. android:layout_height="wrap_content"
  26. android:layout_weight="1"
  27. android:hint="Nama Depan" />
  28.  
  29. <EditText
  30. android:id="@+id/inputNamaBelakang"
  31. android:layout_width="0dp"
  32. android:layout_height="wrap_content"
  33. android:layout_weight="1"
  34. android:hint="Nama Belakang" />
  35.  
  36. </LinearLayout>
  37.  
  38. <com.google.android.material.textfield.TextInputLayout
  39. android:layout_width="match_parent"
  40. android:layout_height="wrap_content">
  41.  
  42. <EditText
  43. android:id="@+id/inputNoHp"
  44. android:inputType="number"
  45. android:maxLength="12"
  46. android:layout_width="match_parent"
  47. android:layout_height="wrap_content"
  48. android:layout_marginBottom="8dp"
  49. android:hint="No Hp" />
  50.  
  51. </com.google.android.material.textfield.TextInputLayout>
  52.  
  53. <TextView
  54. android:layout_width="wrap_content"
  55. android:layout_height="wrap_content"
  56. android:text="Gender" />
  57.  
  58.  
  59. <RadioGroup
  60. android:layout_width="match_parent"
  61. android:layout_height="wrap_content"
  62. android:layout_marginBottom="8dp"
  63. android:orientation="horizontal">
  64.  
  65. <RadioButton
  66. android:id="@+id/rbPria"
  67. android:layout_width="wrap_content"
  68. android:layout_height="wrap_content"
  69. android:text="Pria" />
  70.  
  71. <RadioButton
  72. android:id="@+id/rbWanita"
  73. android:layout_width="wrap_content"
  74. android:layout_height="wrap_content"
  75. android:text="Wanita" />
  76. </RadioGroup>
  77.  
  78. <TextView
  79. android:layout_width="wrap_content"
  80. android:layout_height="wrap_content"
  81. android:text="Jenjang" />
  82.  
  83. <Spinner
  84. android:id="@+id/spinnerJenjang"
  85. android:layout_width="match_parent"
  86. android:layout_height="wrap_content"
  87. android:layout_marginBottom="8dp"
  88. android:entries="@array/jenjang" />
  89.  
  90. <TextView
  91. android:layout_width="wrap_content"
  92. android:layout_height="wrap_content"
  93. android:text="Hobi" />
  94.  
  95. <CheckBox
  96. android:id="@+id/cbMembaca"
  97. android:layout_width="wrap_content"
  98. android:layout_height="wrap_content"
  99. android:text="Membaca" />
  100.  
  101.  
  102. <CheckBox
  103. android:id="@+id/cbMenulis"
  104. android:layout_width="wrap_content"
  105. android:layout_height="wrap_content"
  106. android:text="Menulis" />
  107.  
  108.  
  109. <CheckBox
  110. android:id="@+id/cbMenggambar"
  111. android:layout_width="wrap_content"
  112. android:layout_height="wrap_content"
  113. android:layout_marginBottom="8dp"
  114. android:text="Menggambar" />
  115.  
  116.  
  117. <com.google.android.material.textfield.TextInputLayout
  118. android:layout_width="match_parent"
  119. android:layout_height="wrap_content">
  120.  
  121. <EditText
  122. android:id="@+id/inputAlamat"
  123. android:layout_width="match_parent"
  124. android:layout_height="150dp"
  125. android:layout_marginBottom="8dp"
  126. android:gravity="start"
  127. android:hint="Alamat" />
  128. </com.google.android.material.textfield.TextInputLayout>
  129.  
  130. <Button
  131. android:id="@+id/btnSimpan"
  132. android:drawableLeft="@drawable/ic_save_black"
  133. android:layout_width="match_parent"
  134. android:layout_height="wrap_content"
  135. android:text="Simpan" />
  136.  
  137. </LinearLayout>
  138.  
  139.  
  140. </ScrollView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement