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.

207 lines
7.7KB

  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. <TextView
  32. android:id="@+id/textView4"
  33. android:layout_width="match_parent"
  34. android:layout_height="wrap_content"
  35. android:text="Track length" />
  36. <SeekBar
  37. android:id="@+id/trackLengthSeekBar"
  38. style="@android:style/Widget.Material.SeekBar"
  39. android:layout_width="match_parent"
  40. android:layout_height="wrap_content"
  41. android:max="250"
  42. android:min="1"
  43. android:progress="50" />
  44. <TextView
  45. android:id="@+id/textView3"
  46. android:layout_width="match_parent"
  47. android:layout_height="wrap_content"
  48. android:text="Number of vehicles" />
  49. <SeekBar
  50. android:id="@+id/noOfVehiclesSeekBar"
  51. style="@style/Widget.AppCompat.SeekBar"
  52. android:layout_width="match_parent"
  53. android:layout_height="wrap_content"
  54. android:max="250"
  55. android:min="1"
  56. android:progress="3" />
  57. <TextView
  58. android:id="@+id/textView5"
  59. android:layout_width="match_parent"
  60. android:layout_height="wrap_content"
  61. android:text="Maximum velocity" />
  62. <SeekBar
  63. android:id="@+id/maxVelocitySeekBar"
  64. style="@style/Widget.AppCompat.SeekBar.Discrete"
  65. android:layout_width="match_parent"
  66. android:layout_height="wrap_content"
  67. android:max="10"
  68. android:progress="3" />
  69. <TextView
  70. android:id="@+id/textView6"
  71. android:layout_width="match_parent"
  72. android:layout_height="wrap_content"
  73. android:text="Brake probability" />
  74. <SeekBar
  75. android:id="@+id/brakeProbabilitySeekBar"
  76. style="@style/Widget.AppCompat.SeekBar.Discrete"
  77. android:layout_width="match_parent"
  78. android:layout_height="wrap_content"
  79. android:max="20"
  80. android:min="0"
  81. android:progress="6" />
  82. </LinearLayout>
  83. <View
  84. android:id="@+id/divider"
  85. android:layout_width="match_parent"
  86. android:layout_height="1dp"
  87. android:background="?android:attr/listDivider" />
  88. <TableLayout
  89. android:layout_width="match_parent"
  90. android:layout_height="wrap_content"
  91. android:paddingTop="8dp"
  92. android:paddingBottom="8dp">
  93. <TableRow
  94. android:layout_width="match_parent"
  95. android:layout_height="match_parent">
  96. <TextView
  97. android:id="@+id/textView2"
  98. android:layout_width="match_parent"
  99. android:layout_height="wrap_content"
  100. android:text="Average velocity (overall):" />
  101. <TextView
  102. android:id="@+id/avgVeloOverallView"
  103. android:layout_width="wrap_content"
  104. android:layout_height="wrap_content" />
  105. </TableRow>
  106. <TableRow
  107. android:layout_width="match_parent"
  108. android:layout_height="match_parent">
  109. <TextView
  110. android:id="@+id/textView"
  111. android:layout_width="match_parent"
  112. android:layout_height="wrap_content"
  113. android:text="Average velocity (last step):" />
  114. <TextView
  115. android:id="@+id/avgVeloLastView"
  116. android:layout_width="wrap_content"
  117. android:layout_height="wrap_content" />
  118. </TableRow>
  119. </TableLayout>
  120. <View
  121. android:id="@+id/divider2"
  122. android:layout_width="match_parent"
  123. android:layout_height="1dp"
  124. android:background="?android:attr/listDivider" />
  125. <androidx.constraintlayout.widget.ConstraintLayout
  126. android:layout_width="match_parent"
  127. android:layout_height="match_parent"
  128. android:paddingTop="8dp"
  129. android:paddingBottom="8dp">
  130. <LinearLayout
  131. android:id="@+id/trackViewStack"
  132. android:layout_width="match_parent"
  133. android:layout_height="0dp"
  134. android:orientation="vertical"
  135. app:layout_constraintBottom_toTopOf="@+id/linearLayout"
  136. app:layout_constraintTop_toTopOf="parent"
  137. tools:layout_editor_absoluteX="8dp">
  138. </LinearLayout>
  139. <LinearLayout
  140. android:id="@+id/linearLayout"
  141. android:layout_width="match_parent"
  142. android:layout_height="wrap_content"
  143. android:orientation="horizontal"
  144. android:paddingTop="8dp"
  145. app:layout_constraintBottom_toBottomOf="parent"
  146. app:layout_constraintEnd_toEndOf="parent"
  147. app:layout_constraintStart_toStartOf="@+id/playButton">
  148. <Button
  149. android:id="@+id/playButton"
  150. style="@style/Widget.AppCompat.Button.Borderless"
  151. android:layout_width="wrap_content"
  152. android:layout_height="wrap_content"
  153. android:onClick="onPlayButtonClick"
  154. android:text="Play" />
  155. <Button
  156. android:id="@+id/stepButton"
  157. style="@style/Widget.AppCompat.Button.Borderless"
  158. android:layout_width="wrap_content"
  159. android:layout_height="wrap_content"
  160. android:onClick="onStepButtonClick"
  161. android:text="Step" />
  162. <Button
  163. android:id="@+id/stopButton"
  164. style="@style/Widget.AppCompat.Button.Borderless"
  165. android:layout_width="wrap_content"
  166. android:layout_height="wrap_content"
  167. android:enabled="false"
  168. android:onClick="onStopButtonClick"
  169. android:text="Stop" />
  170. </LinearLayout>
  171. </androidx.constraintlayout.widget.ConstraintLayout>
  172. </LinearLayout>
  173. </androidx.constraintlayout.widget.ConstraintLayout>