wildanfuady

activity_form.xml

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