|
|
@@ -8,53 +8,199 @@ |
|
|
|
tools:context=".MainActivity"> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:id="@+id/trackViewStack" |
|
|
|
android:layout_width="0dp" |
|
|
|
android:layout_height="0dp" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="match_parent" |
|
|
|
android:layout_marginStart="8dp" |
|
|
|
android:layout_marginTop="8dp" |
|
|
|
android:layout_marginEnd="8dp" |
|
|
|
android:layout_marginBottom="8dp" |
|
|
|
android:orientation="vertical" |
|
|
|
app:layout_constraintBottom_toBottomOf="parent" |
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
app:layout_constraintStart_toStartOf="parent" |
|
|
|
app:layout_constraintTop_toTopOf="parent" /> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/stopButton" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_marginBottom="16dp" |
|
|
|
android:enabled="false" |
|
|
|
android:onClick="onStopButtonClick" |
|
|
|
android:text="Stop" |
|
|
|
app:layout_constraintBottom_toBottomOf="parent" |
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
app:layout_constraintHorizontal_bias="0.95" |
|
|
|
app:layout_constraintStart_toStartOf="parent" /> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/stepButton" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_marginBottom="16dp" |
|
|
|
android:onClick="onStepButtonClick" |
|
|
|
android:text="Step" |
|
|
|
app:layout_constraintBottom_toBottomOf="parent" |
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
app:layout_constraintHorizontal_bias="0.5" |
|
|
|
app:layout_constraintStart_toStartOf="parent" /> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/playButton" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:layout_marginBottom="16dp" |
|
|
|
android:onClick="onPlayButtonClick" |
|
|
|
android:text="Play" |
|
|
|
app:layout_constraintBottom_toBottomOf="parent" |
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
app:layout_constraintHorizontal_bias="0.049" |
|
|
|
app:layout_constraintStart_toStartOf="parent" /> |
|
|
|
app:layout_constraintTop_toTopOf="parent"> |
|
|
|
|
|
|
|
<View |
|
|
|
android:id="@+id/divider3" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="1dp" |
|
|
|
android:background="?android:attr/listDivider" /> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:orientation="vertical" |
|
|
|
android:paddingTop="8dp" |
|
|
|
android:paddingBottom="8dp"> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:id="@+id/textView4" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Track length" /> |
|
|
|
|
|
|
|
<SeekBar |
|
|
|
android:id="@+id/seekBar3" |
|
|
|
style="@style/Widget.AppCompat.SeekBar.Discrete" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:max="10" |
|
|
|
android:progress="3" /> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:id="@+id/textView3" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Number of vehicles" /> |
|
|
|
|
|
|
|
<SeekBar |
|
|
|
android:id="@+id/seekBar2" |
|
|
|
style="@style/Widget.AppCompat.SeekBar.Discrete" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:max="10" |
|
|
|
android:progress="3" /> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:id="@+id/textView5" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Maximum velocity" /> |
|
|
|
|
|
|
|
<SeekBar |
|
|
|
android:id="@+id/seekBar4" |
|
|
|
style="@style/Widget.AppCompat.SeekBar.Discrete" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:max="10" |
|
|
|
android:progress="3" /> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:id="@+id/textView6" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Brake probability" /> |
|
|
|
|
|
|
|
<SeekBar |
|
|
|
android:id="@+id/seekBar5" |
|
|
|
style="@style/Widget.AppCompat.SeekBar.Discrete" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:max="10" |
|
|
|
android:progress="3" /> |
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
<View |
|
|
|
android:id="@+id/divider" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="1dp" |
|
|
|
android:background="?android:attr/listDivider" /> |
|
|
|
|
|
|
|
<TableLayout |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:paddingTop="8dp" |
|
|
|
android:paddingBottom="8dp"> |
|
|
|
|
|
|
|
<TableRow |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="match_parent"> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:id="@+id/textView2" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Average velocity (overall):" /> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:id="@+id/textView7" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="TextView" /> |
|
|
|
</TableRow> |
|
|
|
|
|
|
|
<TableRow |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="match_parent"> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:id="@+id/textView" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="Average velocity (last step):" /> |
|
|
|
|
|
|
|
<TextView |
|
|
|
android:id="@+id/textView8" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:text="TextView" /> |
|
|
|
|
|
|
|
</TableRow> |
|
|
|
|
|
|
|
</TableLayout> |
|
|
|
|
|
|
|
<View |
|
|
|
android:id="@+id/divider2" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="1dp" |
|
|
|
android:background="?android:attr/listDivider" /> |
|
|
|
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="match_parent" |
|
|
|
android:paddingTop="8dp" |
|
|
|
android:paddingBottom="8dp"> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:id="@+id/trackViewStack" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="0dp" |
|
|
|
android:orientation="vertical" |
|
|
|
app:layout_constraintBottom_toTopOf="@+id/linearLayout" |
|
|
|
app:layout_constraintTop_toTopOf="parent" |
|
|
|
tools:layout_editor_absoluteX="8dp"> |
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
<LinearLayout |
|
|
|
android:id="@+id/linearLayout" |
|
|
|
android:layout_width="match_parent" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:orientation="horizontal" |
|
|
|
android:paddingTop="8dp" |
|
|
|
app:layout_constraintBottom_toBottomOf="parent" |
|
|
|
app:layout_constraintEnd_toEndOf="parent" |
|
|
|
app:layout_constraintStart_toStartOf="@+id/playButton"> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/playButton" |
|
|
|
style="@style/Widget.AppCompat.Button.Borderless" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:onClick="onPlayButtonClick" |
|
|
|
android:text="Play" /> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/stepButton" |
|
|
|
style="@style/Widget.AppCompat.Button.Borderless" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:onClick="onStepButtonClick" |
|
|
|
android:text="Step" /> |
|
|
|
|
|
|
|
<Button |
|
|
|
android:id="@+id/stopButton" |
|
|
|
style="@style/Widget.AppCompat.Button.Borderless" |
|
|
|
android:layout_width="wrap_content" |
|
|
|
android:layout_height="wrap_content" |
|
|
|
android:enabled="false" |
|
|
|
android:onClick="onStopButtonClick" |
|
|
|
android:text="Stop" /> |
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |
|
|
|
|
|
|
|
</LinearLayout> |
|
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |