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.

363 lines
14KB

  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/textView7"
  144. android:layout_width="wrap_content"
  145. android:layout_height="wrap_content"
  146. android:text="Steps" />
  147. <TextView
  148. android:id="@+id/textView9"
  149. android:layout_width="wrap_content"
  150. android:layout_height="wrap_content"
  151. android:text=" " />
  152. <TextView
  153. android:id="@+id/stepsTextView"
  154. android:layout_width="wrap_content"
  155. android:layout_height="wrap_content"
  156. android:text="0" />
  157. </TableRow>
  158. <TableRow
  159. android:layout_width="match_parent"
  160. android:layout_height="match_parent">
  161. <TextView
  162. android:id="@+id/textView2"
  163. android:layout_width="match_parent"
  164. android:layout_height="wrap_content"
  165. android:text="Average velocity (overall):" />
  166. <TextView
  167. android:id="@+id/textView10"
  168. android:layout_width="wrap_content"
  169. android:layout_height="wrap_content"
  170. android:text=" " />
  171. <TextView
  172. android:id="@+id/avgVeloOverallView"
  173. android:layout_width="wrap_content"
  174. android:layout_height="wrap_content"
  175. android:text="0.0" />
  176. </TableRow>
  177. <TableRow
  178. android:layout_width="match_parent"
  179. android:layout_height="match_parent">
  180. <TextView
  181. android:id="@+id/textView"
  182. android:layout_width="match_parent"
  183. android:layout_height="wrap_content"
  184. android:text="Average velocity (last step):" />
  185. <TextView
  186. android:id="@+id/textView11"
  187. android:layout_width="wrap_content"
  188. android:layout_height="wrap_content"
  189. android:text=" " />
  190. <TextView
  191. android:id="@+id/avgVeloLastView"
  192. android:layout_width="wrap_content"
  193. android:layout_height="wrap_content"
  194. android:text="0.0" />
  195. </TableRow>
  196. <TableRow
  197. android:layout_width="match_parent"
  198. android:layout_height="match_parent" >
  199. <TextView
  200. android:id="@+id/textView14"
  201. android:layout_width="wrap_content"
  202. android:layout_height="wrap_content"
  203. android:text="Delayed average velocity:" />
  204. <TextView
  205. android:id="@+id/textView13"
  206. android:layout_width="wrap_content"
  207. android:layout_height="wrap_content"
  208. android:text=" " />
  209. <TextView
  210. android:id="@+id/delayedAvgTextView"
  211. android:layout_width="wrap_content"
  212. android:layout_height="wrap_content"
  213. android:text="0.0" />
  214. </TableRow>
  215. </TableLayout>
  216. <View
  217. android:id="@+id/divider2"
  218. android:layout_width="match_parent"
  219. android:layout_height="1dp"
  220. android:background="?android:attr/listDivider" />
  221. <androidx.constraintlayout.widget.ConstraintLayout
  222. android:layout_width="match_parent"
  223. android:layout_height="match_parent"
  224. android:paddingTop="8dp"
  225. android:paddingBottom="8dp">
  226. <LinearLayout
  227. android:id="@+id/trackViewStack"
  228. android:layout_width="match_parent"
  229. android:layout_height="500dp"
  230. android:orientation="vertical"
  231. app:layout_constraintTop_toTopOf="parent"
  232. tools:layout_editor_absoluteX="8dp">
  233. </LinearLayout>
  234. <androidx.constraintlayout.widget.ConstraintLayout
  235. android:id="@+id/constraintLayout"
  236. android:layout_width="0dp"
  237. android:layout_height="wrap_content"
  238. app:layout_constraintBottom_toTopOf="@+id/linearLayout"
  239. app:layout_constraintEnd_toEndOf="parent"
  240. app:layout_constraintStart_toStartOf="parent">
  241. <TextView
  242. android:id="@+id/textView6"
  243. android:layout_width="wrap_content"
  244. android:layout_height="wrap_content"
  245. android:text="Delay:" />
  246. <SeekBar
  247. android:id="@+id/simDelaySeekBar"
  248. android:layout_width="0dp"
  249. android:layout_height="wrap_content"
  250. android:max="1000"
  251. android:min="0"
  252. app:layout_constraintEnd_toStartOf="@+id/simDelayTextView"
  253. app:layout_constraintStart_toEndOf="@+id/textView6"
  254. app:layout_constraintTop_toTopOf="parent" />
  255. <TextView
  256. android:id="@+id/simDelayTextView"
  257. android:layout_width="50dp"
  258. android:layout_height="wrap_content"
  259. android:gravity="right"
  260. android:text="0"
  261. app:layout_constraintEnd_toEndOf="parent"
  262. app:layout_constraintTop_toTopOf="parent" />
  263. </androidx.constraintlayout.widget.ConstraintLayout>
  264. <LinearLayout
  265. android:id="@+id/linearLayout"
  266. android:layout_width="match_parent"
  267. android:layout_height="wrap_content"
  268. android:orientation="horizontal"
  269. android:paddingTop="8dp"
  270. app:layout_constraintBottom_toBottomOf="parent"
  271. app:layout_constraintEnd_toEndOf="parent"
  272. app:layout_constraintStart_toStartOf="@+id/playButton">
  273. <Button
  274. android:id="@+id/playButton"
  275. style="@style/Widget.AppCompat.Button.Borderless"
  276. android:layout_width="wrap_content"
  277. android:layout_height="wrap_content"
  278. android:onClick="onPlayButtonClick"
  279. android:text="Play" />
  280. <Button
  281. android:id="@+id/stepButton"
  282. style="@style/Widget.AppCompat.Button.Borderless"
  283. android:layout_width="wrap_content"
  284. android:layout_height="wrap_content"
  285. android:onClick="onStepButtonClick"
  286. android:text="Step" />
  287. <Button
  288. android:id="@+id/stopButton"
  289. style="@style/Widget.AppCompat.Button.Borderless"
  290. android:layout_width="wrap_content"
  291. android:layout_height="wrap_content"
  292. android:enabled="false"
  293. android:onClick="onStopButtonClick"
  294. android:text="Stop" />
  295. <Button
  296. android:id="@+id/clearButton"
  297. style="@style/Widget.AppCompat.Button.Borderless"
  298. android:layout_width="wrap_content"
  299. android:layout_height="wrap_content"
  300. android:layout_weight="1"
  301. android:onClick="onClearButtonClick"
  302. android:text="clear" />
  303. </LinearLayout>
  304. </androidx.constraintlayout.widget.ConstraintLayout>
  305. </LinearLayout>
  306. </androidx.constraintlayout.widget.ConstraintLayout>