You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

261 lines
10KB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout 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/constr_layout"
  6. android:layout_width="match_parent"
  7. android:layout_height="match_parent"
  8. tools:context=".MainActivity">
  9. <LinearLayout
  10. android:layout_width="match_parent"
  11. android:layout_height="match_parent"
  12. android:layout_marginStart="8dp"
  13. android:layout_marginEnd="8dp"
  14. android:layout_marginBottom="8dp"
  15. android:orientation="vertical"
  16. app:layout_constraintBottom_toBottomOf="parent"
  17. app:layout_constraintEnd_toEndOf="parent"
  18. app:layout_constraintStart_toStartOf="parent"
  19. app:layout_constraintTop_toTopOf="parent">
  20. <View
  21. android:id="@+id/divider3"
  22. android:layout_width="match_parent"
  23. android:layout_height="1dp"
  24. android:background="?android:attr/listDivider" />
  25. <LinearLayout
  26. android:layout_width="match_parent"
  27. android:layout_height="wrap_content"
  28. android:orientation="vertical"
  29. android:paddingTop="8dp"
  30. android:paddingBottom="8dp">
  31. <androidx.constraintlayout.widget.ConstraintLayout
  32. android:layout_width="match_parent"
  33. android:layout_height="match_parent">
  34. <TextView
  35. android:id="@+id/textView4"
  36. android:layout_width="match_parent"
  37. android:layout_height="wrap_content"
  38. android:text="Track length"
  39. app:layout_constraintStart_toStartOf="parent"
  40. app:layout_constraintTop_toTopOf="parent" />
  41. <TextView
  42. android:id="@+id/trackLengthTextView"
  43. android:layout_width="wrap_content"
  44. android:layout_height="wrap_content"
  45. app:layout_constraintEnd_toEndOf="parent"
  46. app:layout_constraintTop_toTopOf="parent" />
  47. </androidx.constraintlayout.widget.ConstraintLayout>
  48. <SeekBar
  49. android:id="@+id/trackLengthSeekBar"
  50. style="@android:style/Widget.Material.SeekBar"
  51. android:layout_width="match_parent"
  52. android:layout_height="wrap_content"
  53. android:max="250"
  54. android:min="1"
  55. android:progress="50" />
  56. <androidx.constraintlayout.widget.ConstraintLayout
  57. android:layout_width="match_parent"
  58. android:layout_height="match_parent">
  59. <TextView
  60. android:id="@+id/textView3"
  61. android:layout_width="wrap_content"
  62. android:layout_height="wrap_content"
  63. android:text="Number of vehicles"
  64. app:layout_constraintStart_toStartOf="parent"
  65. app:layout_constraintTop_toTopOf="parent" />
  66. <TextView
  67. android:id="@+id/noOfVehiclesTextView"
  68. android:layout_width="wrap_content"
  69. android:layout_height="wrap_content"
  70. app:layout_constraintEnd_toEndOf="parent"
  71. app:layout_constraintTop_toTopOf="parent" />
  72. </androidx.constraintlayout.widget.ConstraintLayout>
  73. <SeekBar
  74. android:id="@+id/noOfVehiclesSeekBar"
  75. style="@style/Widget.AppCompat.SeekBar"
  76. android:layout_width="match_parent"
  77. android:layout_height="wrap_content"
  78. android:max="250"
  79. android:min="1"
  80. android:progress="3" />
  81. <androidx.constraintlayout.widget.ConstraintLayout
  82. android:layout_width="match_parent"
  83. android:layout_height="match_parent">
  84. <TextView
  85. android:id="@+id/textView5"
  86. android:layout_width="match_parent"
  87. android:layout_height="wrap_content"
  88. android:text="Maximum velocity"
  89. app:layout_constraintStart_toStartOf="parent"
  90. app:layout_constraintTop_toTopOf="parent" />
  91. <TextView
  92. android:id="@+id/maxVeloTextView"
  93. android:layout_width="wrap_content"
  94. android:layout_height="wrap_content"
  95. app:layout_constraintEnd_toEndOf="@+id/textView5" />
  96. </androidx.constraintlayout.widget.ConstraintLayout>
  97. <SeekBar
  98. android:id="@+id/maxVelocitySeekBar"
  99. style="@style/Widget.AppCompat.SeekBar.Discrete"
  100. android:layout_width="match_parent"
  101. android:layout_height="wrap_content"
  102. android:max="10"
  103. android:progress="3" />
  104. <androidx.constraintlayout.widget.ConstraintLayout
  105. android:layout_width="match_parent"
  106. android:layout_height="match_parent">
  107. <TextView
  108. android:id="@+id/brakeProbLabel"
  109. android:layout_width="match_parent"
  110. android:layout_height="wrap_content"
  111. android:text="Brake probability"
  112. app:layout_constraintStart_toStartOf="parent"
  113. app:layout_constraintTop_toTopOf="parent" />
  114. <TextView
  115. android:id="@+id/brakeProbTextView"
  116. android:layout_width="wrap_content"
  117. android:layout_height="wrap_content"
  118. app:layout_constraintEnd_toEndOf="@+id/brakeProbLabel" />
  119. </androidx.constraintlayout.widget.ConstraintLayout>
  120. <SeekBar
  121. android:id="@+id/brakeProbabilitySeekBar"
  122. style="@style/Widget.AppCompat.SeekBar.Discrete"
  123. android:layout_width="match_parent"
  124. android:layout_height="wrap_content"
  125. android:max="20"
  126. android:min="0"
  127. android:progress="6" />
  128. </LinearLayout>
  129. <View
  130. android:id="@+id/divider"
  131. android:layout_width="match_parent"
  132. android:layout_height="1dp"
  133. android:background="?android:attr/listDivider" />
  134. <TableLayout
  135. android:layout_width="match_parent"
  136. android:layout_height="wrap_content"
  137. android:paddingTop="8dp"
  138. android:paddingBottom="8dp">
  139. <TableRow
  140. android:layout_width="match_parent"
  141. android:layout_height="match_parent">
  142. <TextView
  143. android:id="@+id/textView2"
  144. android:layout_width="match_parent"
  145. android:layout_height="wrap_content"
  146. android:text="Average velocity (overall):" />
  147. <TextView
  148. android:id="@+id/avgVeloOverallView"
  149. android:layout_width="wrap_content"
  150. android:layout_height="wrap_content" />
  151. </TableRow>
  152. <TableRow
  153. android:layout_width="match_parent"
  154. android:layout_height="match_parent">
  155. <TextView
  156. android:id="@+id/textView"
  157. android:layout_width="match_parent"
  158. android:layout_height="wrap_content"
  159. android:text="Average velocity (last step):" />
  160. <TextView
  161. android:id="@+id/avgVeloLastView"
  162. android:layout_width="wrap_content"
  163. android:layout_height="wrap_content" />
  164. </TableRow>
  165. </TableLayout>
  166. <View
  167. android:id="@+id/divider2"
  168. android:layout_width="match_parent"
  169. android:layout_height="1dp"
  170. android:background="?android:attr/listDivider" />
  171. <androidx.constraintlayout.widget.ConstraintLayout
  172. android:layout_width="match_parent"
  173. android:layout_height="match_parent"
  174. android:paddingTop="8dp"
  175. android:paddingBottom="8dp">
  176. <LinearLayout
  177. android:id="@+id/trackViewStack"
  178. android:layout_width="match_parent"
  179. android:layout_height="0dp"
  180. android:orientation="vertical"
  181. app:layout_constraintBottom_toTopOf="@+id/linearLayout"
  182. app:layout_constraintTop_toTopOf="parent"
  183. tools:layout_editor_absoluteX="8dp">
  184. </LinearLayout>
  185. <LinearLayout
  186. android:id="@+id/linearLayout"
  187. android:layout_width="match_parent"
  188. android:layout_height="wrap_content"
  189. android:orientation="horizontal"
  190. android:paddingTop="8dp"
  191. app:layout_constraintBottom_toBottomOf="parent"
  192. app:layout_constraintEnd_toEndOf="parent"
  193. app:layout_constraintStart_toStartOf="@+id/playButton">
  194. <Button
  195. android:id="@+id/playButton"
  196. style="@style/Widget.AppCompat.Button.Borderless"
  197. android:layout_width="wrap_content"
  198. android:layout_height="wrap_content"
  199. android:onClick="onPlayButtonClick"
  200. android:text="Play" />
  201. <Button
  202. android:id="@+id/stepButton"
  203. style="@style/Widget.AppCompat.Button.Borderless"
  204. android:layout_width="wrap_content"
  205. android:layout_height="wrap_content"
  206. android:onClick="onStepButtonClick"
  207. android:text="Step" />
  208. <Button
  209. android:id="@+id/stopButton"
  210. style="@style/Widget.AppCompat.Button.Borderless"
  211. android:layout_width="wrap_content"
  212. android:layout_height="wrap_content"
  213. android:enabled="false"
  214. android:onClick="onStopButtonClick"
  215. android:text="Stop" />
  216. </LinearLayout>
  217. </androidx.constraintlayout.widget.ConstraintLayout>
  218. </LinearLayout>
  219. </androidx.constraintlayout.widget.ConstraintLayout>