Advertisement
Guest User

sportsactivity_xml

a guest
Apr 12th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.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. xmlns:tools="http://schemas.android.com/tools"
  4. android:orientation="vertical"
  5. android:layout_width="match_parent"
  6. android:layout_height="match_parent">
  7.  
  8. <LinearLayout
  9. android:id="@+id/sports_layout"
  10. android:layout_width="wrap_content"
  11. android:layout_height="wrap_content"
  12. android:orientation="vertical">
  13.  
  14. <TextView
  15. android:id="@+id/question_one"
  16. style="@style/Base.ThemeOverlay.AppCompat.ActionBar"
  17. android:layout_width="match_parent"
  18. android:layout_height="wrap_content"
  19. android:text="@string/question_one_sports"
  20. android:textAppearance="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
  21. tools:theme="@android:style/Theme.Holo.Light.DarkActionBar" />
  22.  
  23. <RadioGroup
  24. android:id="@+id/answers_one_group"
  25. android:layout_marginTop="15dp"
  26. android:layout_width="wrap_content"
  27. android:layout_height="wrap_content">
  28. <RadioButton
  29. android:id="@+id/answer_one_a_correct"
  30. android:layout_width="match_parent"
  31. android:layout_height="wrap_content"
  32. android:text="@string/answer_one_a" />
  33.  
  34. <RadioButton
  35. android:id="@+id/answer_one_b_incorrect"
  36. android:layout_width="match_parent"
  37. android:layout_height="wrap_content"
  38. android:text="@string/answer_one_b" />
  39.  
  40. <RadioButton
  41. android:id="@+id/answer_one_c_incorrect"
  42. android:layout_width="match_parent"
  43. android:layout_height="wrap_content"
  44. android:text="@string/answer_one_c" />
  45. </RadioGroup>
  46.  
  47. <TextView
  48. android:id="@+id/question_two"
  49. android:layout_marginTop="15dp"
  50. style="@style/Base.ThemeOverlay.AppCompat.ActionBar"
  51. android:layout_width="match_parent"
  52. android:layout_height="wrap_content"
  53. android:text="@string/question_two_sports"
  54. android:textAppearance="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
  55. tools:theme="@android:style/Theme.Holo.Light.DarkActionBar" />
  56.  
  57. <RadioGroup
  58. android:id="@+id/answers_two_group"
  59. android:layout_marginTop="15dp"
  60. android:layout_width="wrap_content"
  61. android:layout_height="wrap_content">
  62.  
  63. <RadioButton
  64. android:id="@+id/answer_two_a_incorrect"
  65. android:layout_width="match_parent"
  66. android:layout_height="wrap_content"
  67. android:text="@string/answer_two_a" />
  68.  
  69. <RadioButton
  70. android:id="@+id/answer_two_b_correct"
  71. android:layout_width="match_parent"
  72. android:layout_height="wrap_content"
  73. android:text="@string/answer_two_b" />
  74.  
  75. <RadioButton
  76. android:id="@+id/answer_two_c_incorrect"
  77. android:layout_width="match_parent"
  78. android:layout_height="wrap_content"
  79. android:text="@string/answer_two_c" />
  80. </RadioGroup>
  81.  
  82. <TextView
  83. android:id="@+id/question_three"
  84. android:layout_marginTop="15dp"
  85. style="@style/Base.ThemeOverlay.AppCompat.ActionBar"
  86. android:layout_width="match_parent"
  87. android:layout_height="wrap_content"
  88. android:text="@string/question_three_sports"
  89. android:textAppearance="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
  90. tools:theme="@android:style/Theme.Holo.Light.DarkActionBar" />
  91.  
  92. <RadioGroup
  93. android:id="@+id/answers_three_group"
  94. android:layout_marginTop="15dp"
  95. android:layout_width="wrap_content"
  96. android:layout_height="wrap_content">
  97.  
  98. <RadioButton
  99. android:id="@+id/answer_three_a_incorrect"
  100. android:layout_width="match_parent"
  101. android:layout_height="wrap_content"
  102. android:text="@string/answer_three_a" />
  103.  
  104. <RadioButton
  105. android:id="@+id/answer_three_b_correct"
  106. android:layout_width="match_parent"
  107. android:layout_height="wrap_content"
  108. android:text="@string/answer_three_b" />
  109.  
  110. <RadioButton
  111. android:id="@+id/answer_three_c_incorrect"
  112. android:layout_width="match_parent"
  113. android:layout_height="wrap_content"
  114. android:text="@string/answer_three_c" />
  115. </RadioGroup>
  116. <TextView
  117. android:id="@+id/question_four"
  118. android:layout_marginTop="15dp"
  119. style="@style/Base.ThemeOverlay.AppCompat.ActionBar"
  120. android:layout_width="match_parent"
  121. android:layout_height="wrap_content"
  122. android:text="@string/question_four_sports"
  123. android:textAppearance="@style/TextAppearance.AppCompat.Widget.ActionBar.Title"
  124. tools:theme="@android:style/Theme.Holo.Light.DarkActionBar" />
  125.  
  126. <RadioGroup
  127. android:id="@+id/answers_four_group"
  128. android:layout_marginTop="15dp"
  129. android:layout_width="wrap_content"
  130. android:layout_height="wrap_content">
  131. <RadioButton
  132. android:id="@+id/answer_four_a_correct"
  133. android:layout_width="match_parent"
  134. android:layout_height="wrap_content"
  135. android:text="@string/answer_four_a" />
  136.  
  137. <RadioButton
  138. android:id="@+id/answer_four_b_incorrect"
  139. android:layout_width="match_parent"
  140. android:layout_height="wrap_content"
  141. android:text="@string/answer_four_b" />
  142.  
  143. <RadioButton
  144. android:id="@+id/answer_four_c_incorrect"
  145. android:layout_width="match_parent"
  146. android:layout_height="wrap_content"
  147. android:text="@string/answer_four_c" />
  148. </RadioGroup>
  149.  
  150. <Button
  151. android:id="@+id/btnSubmitSport"
  152. android:onClick="submitScore"
  153. android:layout_marginLeft="80dp"
  154. android:layout_width="208dp"
  155. android:layout_height="match_parent"
  156. android:text="@string/submit_answers" />
  157.  
  158. <Button
  159. android:id="@+id/btnResetSport"
  160. android:layout_width="130dp"
  161. android:layout_height="match_parent"
  162. android:layout_marginLeft="120dp"
  163. android:onClick="resetRadios"
  164. android:text="@string/reset_btn" />
  165.  
  166. </LinearLayout>
  167. </ScrollView>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement