Bimba.git

commit 0b9a20c796b0e520bda78e39b0cde7f9b5604eb2

Author: Adam Evyčędo <git@apiote.xyz>

separate arrivals and departures in bottom sheet

%!v(PANIC=String method: strings: negative Repeat count)


diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapViewModel.kt b/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapViewModel.kt
index 6aa86b0cb2362798e410558411e5229ae8ba873e..a9ff0719d69c398d56d1f3e06ad2aa3cc8072187 100644
--- a/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapViewModel.kt
+++ b/app/src/main/java/xyz/apiote/bimba/czwek/dashboard/ui/map/MapViewModel.kt
@@ -73,7 +73,7 @@ 					vehicle.Headsign
 				)
 			}
 
-			content.findViewById<TextView>(R.id.time).visibility = View.GONE
+			content.findViewById<TextView>(R.id.arrival_time).visibility = View.GONE
 			content.findViewById<TextView>(R.id.local_time).visibility = View.GONE
 
 			content.findViewById<MapView>(R.id.map).visibility = View.GONE




diff --git a/app/src/main/java/xyz/apiote/bimba/czwek/departures/Departures.kt b/app/src/main/java/xyz/apiote/bimba/czwek/departures/Departures.kt
index c730072452d546a0c5e2491786ed586a65e0c694..1149a1f49dab7759417338931a1bfcb36165e2a7 100644
--- a/app/src/main/java/xyz/apiote/bimba/czwek/departures/Departures.kt
+++ b/app/src/main/java/xyz/apiote/bimba/czwek/departures/Departures.kt
@@ -367,7 +367,29 @@ 	}
 
 	private fun setContent(view: View, ctx: Context, updating: Boolean = false) {
 		view.apply {
-			findViewById<TextView>(R.id.time).text = event.arrivalTimeString(ctx)
+			if (event.arrivalTime == event.departureTime) {
+				findViewById<TextView>(R.id.arrival_status).visibility = View.GONE
+				findViewById<TextView>(R.id.arrival_time).text = event.arrivalTimeString(ctx)
+				findViewById<TextView>(R.id.departure_status).visibility = View.GONE
+				findViewById<TextView>(R.id.departure_time).visibility = View.GONE
+			} else {
+				if (event.arrivalTime != null) {
+					findViewById<TextView>(R.id.arrival_time).text = event.arrivalTimeString(ctx)
+					findViewById<TextView>(R.id.arrival_status).text = if (!event.exact) {
+						context?.getString(R.string.arrival_approximate)
+					} else {
+						context?.getString(R.string.arrival)
+					}
+				}
+				if (event.departureTime != null) {
+					findViewById<TextView>(R.id.departure_time).text = event.departureTimeString(ctx)
+					findViewById<TextView>(R.id.departure_status).text = if (!event.exact) {
+						context?.getString(R.string.departure_approximate)
+					} else {
+						context?.getString(R.string.departure)
+					}
+				}
+			}
 			findViewById<TextView>(R.id.local_time).visibility =
 				if (event.timeZone() == ZoneId.systemDefault().id) {
 					View.GONE




diff --git a/app/src/main/res/layout/departure.xml b/app/src/main/res/layout/departure.xml
index 0e0e259af966194135137bef7b3438927d3699c3..c1310c161e81ddac5ab13247ebbc4d3a6a354c08 100644
--- a/app/src/main/res/layout/departure.xml
+++ b/app/src/main/res/layout/departure.xml
@@ -95,7 +95,6 @@         android:id="@+id/event_status"
         android:layout_width="15dp"
         android:layout_height="11dp"
         android:layout_marginStart="8dp"
-        android:layout_marginTop="8dp"
         android:layout_marginBottom="8dp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintStart_toStartOf="parent"




diff --git a/app/src/main/res/layout/departure_bottom_sheet.xml b/app/src/main/res/layout/departure_bottom_sheet.xml
index 3b6e92fa314f2d9967ae05c9200666b9989f8bbb..8f69b25563772a87a3ce920cdbc550b93adcdc05 100644
--- a/app/src/main/res/layout/departure_bottom_sheet.xml
+++ b/app/src/main/res/layout/departure_bottom_sheet.xml
@@ -7,282 +7,314 @@ SPDX-License-Identifier: GPL-3.0-or-later
 -->
 
 <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
-	xmlns:app="http://schemas.android.com/apk/res-auto"
-	xmlns:tool="http://schemas.android.com/tools"
-	android:layout_width="match_parent"
-	android:layout_height="wrap_content"
-	android:paddingBottom="16dp">
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tool="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:paddingBottom="16dp">
 
-	<com.google.android.material.bottomsheet.BottomSheetDragHandleView
-		android:id="@+id/drag_handle"
-		android:layout_width="match_parent"
-		android:layout_height="wrap_content"
-		app:layout_constraintTop_toTopOf="parent" />
+    <com.google.android.material.bottomsheet.BottomSheetDragHandleView
+        android:id="@+id/drag_handle"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        app:layout_constraintTop_toTopOf="parent" />
 
-	<com.google.android.material.textview.MaterialTextView
-		android:id="@+id/time"
-		android:layout_width="wrap_content"
-		android:layout_height="wrap_content"
-		android:layout_marginTop="0dp"
-		android:textAppearance="@style/TextAppearance.Material3.DisplaySmall"
-		app:layout_constraintEnd_toEndOf="parent"
-		app:layout_constraintStart_toStartOf="parent"
-		app:layout_constraintTop_toBottomOf="@+id/drag_handle"
-		tool:text="at 12:10:30" />
+    <com.google.android.material.textview.MaterialTextView
+        android:id="@+id/arrival_status"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="0dp"
+        android:textAppearance="@style/TextAppearance.Material3.BodySmall"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/drag_handle"
+        tool:text="approx. arr." />
 
-	<com.google.android.material.textview.MaterialTextView
-		android:id="@+id/local_time"
-		android:layout_width="wrap_content"
-		android:layout_height="wrap_content"
-		app:layout_constraintTop_toBottomOf="@+id/time"
-		app:layout_constraintEnd_toEndOf="@+id/time"
-		android:text="@string/local_time"
-		android:visibility="gone"
-		app:layout_constraintStart_toStartOf="@+id/time" />
+    <com.google.android.material.textview.MaterialTextView
+        android:id="@+id/arrival_time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="0dp"
+        android:textAppearance="@style/TextAppearance.Material3.DisplaySmall"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/arrival_status"
+        tool:text="at 12:10:30" />
 
-	<com.google.android.material.textview.MaterialTextView
-		android:id="@+id/offset"
-		android:layout_width="wrap_content"
-		android:layout_height="wrap_content"
-		android:layout_marginStart="4dp"
-		android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
-		android:visibility="gone"
-		app:layout_constraintBaseline_toBaselineOf="@+id/time"
-		app:layout_constraintStart_toEndOf="@+id/time"
-		tool:text="(+2 min)" />
+    <com.google.android.material.textview.MaterialTextView
+        android:id="@+id/departure_status"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="8dp"
+        android:textAppearance="@style/TextAppearance.Material3.BodySmall"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/arrival_time"
+        tool:text="approx. dep." />
 
-	<ImageView
-		android:id="@+id/rt_icon"
-		android:layout_width="24dp"
-		android:layout_height="24dp"
-		android:layout_marginStart="16dp"
-		android:contentDescription="@string/realtime_content_description"
-		app:layout_constraintBottom_toBottomOf="@+id/time"
-		app:layout_constraintStart_toStartOf="parent"
-		app:layout_constraintTop_toTopOf="@+id/time"
-		app:srcCompat="@drawable/radar" />
+    <com.google.android.material.textview.MaterialTextView
+        android:id="@+id/departure_time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="0dp"
+        android:textAppearance="@style/TextAppearance.Material3.DisplaySmall"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/departure_status"
+        tool:text="at 12:10:30" />
 
-	<ImageView
-		android:id="@+id/wheelchair_icon"
-		android:layout_width="24dp"
-		android:layout_height="24dp"
-		android:layout_marginStart="8dp"
-		android:contentDescription="@string/wheelchair_content_description"
-		app:layout_constraintStart_toEndOf="@id/rt_icon"
-		app:layout_constraintTop_toTopOf="@+id/rt_icon"
-		app:srcCompat="@drawable/wheelchair" />
+    <com.google.android.material.textview.MaterialTextView
+        android:id="@+id/local_time"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:text="@string/local_time"
+        android:visibility="gone"
+        app:layout_constraintEnd_toEndOf="@+id/departure_time"
+        app:layout_constraintStart_toStartOf="@+id/departure_time"
+        app:layout_constraintTop_toBottomOf="@+id/departure_time" />
 
-	<com.google.android.material.textview.MaterialTextView
-		android:id="@+id/line"
-		android:layout_width="0dp"
-		android:layout_height="wrap_content"
-		android:layout_marginStart="8dp"
-		android:layout_marginTop="8dp"
-		android:layout_marginEnd="8dp"
-		android:textAlignment="center"
-		android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
-		app:layout_constraintEnd_toEndOf="parent"
-		app:layout_constraintStart_toStartOf="parent"
-		app:layout_constraintTop_toBottomOf="@id/local_time" />
+    <com.google.android.material.textview.MaterialTextView
+        android:id="@+id/offset"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="4dp"
+        android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
+        android:visibility="gone"
+        app:layout_constraintBaseline_toBaselineOf="@+id/arrival_time"
+        app:layout_constraintStart_toEndOf="@+id/arrival_time"
+        tool:text="(+2 min)" />
 
-	<androidx.constraintlayout.helper.widget.Flow
-		android:id="@+id/info"
-		android:layout_width="0dp"
-		android:layout_height="wrap_content"
-		android:layout_marginStart="48dp"
-		android:layout_marginTop="48dp"
-		android:layout_marginEnd="48dp"
-		app:constraint_referenced_ids="boarding,speed,congestion,occupancy"
-		app:flow_horizontalGap="4dp"
-		app:flow_horizontalStyle="spread_inside"
-		app:flow_verticalGap="4dp"
-		app:flow_wrapMode="chain"
-		app:layout_constraintEnd_toEndOf="parent"
-		app:layout_constraintStart_toStartOf="parent"
-		app:layout_constraintTop_toBottomOf="@+id/line" />
+    <ImageView
+        android:id="@+id/rt_icon"
+        android:layout_width="24dp"
+        android:layout_height="24dp"
+        android:layout_marginStart="16dp"
+        android:contentDescription="@string/realtime_content_description"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/drag_handle"
+        app:srcCompat="@drawable/radar" />
 
-	<LinearLayout
-		android:id="@+id/boarding"
-		android:layout_width="wrap_content"
-		android:layout_height="wrap_content"
-		android:gravity="center_vertical">
+    <ImageView
+        android:id="@+id/wheelchair_icon"
+        android:layout_width="24dp"
+        android:layout_height="24dp"
+        android:layout_marginStart="8dp"
+        android:contentDescription="@string/wheelchair_content_description"
+        app:layout_constraintStart_toEndOf="@id/rt_icon"
+        app:layout_constraintTop_toTopOf="@+id/rt_icon"
+        app:srcCompat="@drawable/wheelchair" />
 
-		<ImageView
-			android:id="@+id/boarding_icon"
-			android:layout_width="16dp"
-			android:layout_height="16dp"
-			android:layout_marginEnd="8dp"
-			android:importantForAccessibility="no"
-			app:srcCompat="@drawable/transfer" />
+    <com.google.android.material.textview.MaterialTextView
+        android:id="@+id/line"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="8dp"
+        android:layout_marginEnd="8dp"
+        android:textAlignment="center"
+        android:textAppearance="@style/TextAppearance.Material3.HeadlineSmall"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/local_time" />
 
-		<com.google.android.material.textview.MaterialTextView
-			android:id="@+id/boarding_text"
-			android:layout_width="wrap_content"
-			android:layout_height="wrap_content"
-			android:layout_marginEnd="8dp"
-			android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
-			tool:text="on demand" />
-	</LinearLayout>
+    <androidx.constraintlayout.helper.widget.Flow
+        android:id="@+id/info"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="48dp"
+        android:layout_marginTop="48dp"
+        android:layout_marginEnd="48dp"
+        app:constraint_referenced_ids="boarding,speed,congestion,occupancy"
+        app:flow_horizontalGap="4dp"
+        app:flow_horizontalStyle="spread_inside"
+        app:flow_verticalGap="4dp"
+        app:flow_wrapMode="chain"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/line" />
 
-	<LinearLayout
-		android:id="@+id/speed"
-		android:layout_width="wrap_content"
-		android:layout_height="wrap_content"
-		android:gravity="center_vertical">
+    <LinearLayout
+        android:id="@+id/boarding"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:gravity="center_vertical">
 
-		<ImageView
-			android:id="@+id/speed_icon"
-			android:layout_width="16dp"
-			android:layout_height="16dp"
-			android:layout_marginEnd="8dp"
-			android:importantForAccessibility="no"
-			app:srcCompat="@drawable/speed" />
+        <ImageView
+            android:id="@+id/boarding_icon"
+            android:layout_width="16dp"
+            android:layout_height="16dp"
+            android:layout_marginEnd="8dp"
+            android:importantForAccessibility="no"
+            app:srcCompat="@drawable/transfer" />
 
-		<com.google.android.material.textview.MaterialTextView
-			android:id="@+id/speed_text"
-			android:layout_width="wrap_content"
-			android:layout_height="wrap_content"
-			android:layout_marginEnd="8dp"
-			android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
-			tool:text="10 Vl" />
-	</LinearLayout>
+        <com.google.android.material.textview.MaterialTextView
+            android:id="@+id/boarding_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="8dp"
+            android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
+            tool:text="on demand" />
+    </LinearLayout>
 
-	<LinearLayout
-		android:id="@+id/congestion"
-		android:layout_width="wrap_content"
-		android:layout_height="wrap_content"
-		android:gravity="center_vertical">
+    <LinearLayout
+        android:id="@+id/speed"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:gravity="center_vertical">
 
-		<ImageView
-			android:id="@+id/congestion_icon"
-			android:layout_width="16dp"
-			android:layout_height="16dp"
-			android:layout_marginEnd="8dp"
-			android:importantForAccessibility="no"
-			app:srcCompat="@drawable/traffic" />
+        <ImageView
+            android:id="@+id/speed_icon"
+            android:layout_width="16dp"
+            android:layout_height="16dp"
+            android:layout_marginEnd="8dp"
+            android:importantForAccessibility="no"
+            app:srcCompat="@drawable/speed" />
 
-		<com.google.android.material.textview.MaterialTextView
-			android:id="@+id/congestion_text"
-			android:layout_width="wrap_content"
-			android:layout_height="wrap_content"
-			android:layout_marginEnd="8dp"
-			android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
-			tool:text="smooth traffic" />
-	</LinearLayout>
+        <com.google.android.material.textview.MaterialTextView
+            android:id="@+id/speed_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="8dp"
+            android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
+            tool:text="10 Vl" />
+    </LinearLayout>
 
-	<LinearLayout
-		android:id="@+id/occupancy"
-		android:layout_width="wrap_content"
-		android:layout_height="wrap_content"
-		android:gravity="center_vertical">
+    <LinearLayout
+        android:id="@+id/congestion"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:gravity="center_vertical">
 
-		<ImageView
-			android:id="@+id/occupancy_icon"
-			android:layout_width="16dp"
-			android:layout_height="16dp"
-			android:layout_marginEnd="8dp"
-			android:importantForAccessibility="no"
-			app:srcCompat="@drawable/crowd" />
+        <ImageView
+            android:id="@+id/congestion_icon"
+            android:layout_width="16dp"
+            android:layout_height="16dp"
+            android:layout_marginEnd="8dp"
+            android:importantForAccessibility="no"
+            app:srcCompat="@drawable/traffic" />
 
-		<com.google.android.material.textview.MaterialTextView
-			android:id="@+id/occupancy_text"
-			android:layout_width="wrap_content"
-			android:layout_height="wrap_content"
-			android:layout_marginEnd="8dp"
-			android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
-			tool:text="empty vehicle" />
-	</LinearLayout>
+        <com.google.android.material.textview.MaterialTextView
+            android:id="@+id/congestion_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="8dp"
+            android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
+            tool:text="smooth traffic" />
+    </LinearLayout>
 
-	<androidx.constraintlayout.helper.widget.Flow
-		android:id="@+id/capabilities"
-		android:layout_width="0dp"
-		android:layout_height="wrap_content"
-		android:layout_marginStart="8dp"
-		android:layout_marginTop="16dp"
-		android:layout_marginEnd="8dp"
-		app:constraint_referenced_ids="ac,bike,voice,ticket,usb"
-		app:flow_horizontalGap="4dp"
-		app:flow_horizontalStyle="packed"
-		app:flow_verticalGap="4dp"
-		app:flow_wrapMode="chain"
-		app:layout_constraintEnd_toEndOf="parent"
-		app:layout_constraintStart_toStartOf="parent"
-		app:layout_constraintTop_toBottomOf="@+id/info" />
+    <LinearLayout
+        android:id="@+id/occupancy"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:gravity="center_vertical">
 
-	<ImageView
-		android:id="@+id/ac"
-		android:layout_width="24dp"
-		android:layout_height="24dp"
-		android:contentDescription="@string/air_condition_content_description"
-		app:srcCompat="@drawable/ac"
-		tool:ignore="MissingConstraints" />
+        <ImageView
+            android:id="@+id/occupancy_icon"
+            android:layout_width="16dp"
+            android:layout_height="16dp"
+            android:layout_marginEnd="8dp"
+            android:importantForAccessibility="no"
+            app:srcCompat="@drawable/crowd" />
 
-	<ImageView
-		android:id="@+id/bike"
-		android:layout_width="24dp"
-		android:layout_height="24dp"
-		android:contentDescription="@string/bicycles_allowed_content_description"
-		app:srcCompat="@drawable/bike"
-		tool:ignore="MissingConstraints" />
+        <com.google.android.material.textview.MaterialTextView
+            android:id="@+id/occupancy_text"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginEnd="8dp"
+            android:textAppearance="@style/TextAppearance.Material3.BodyLarge"
+            tool:text="empty vehicle" />
+    </LinearLayout>
 
-	<ImageView
-		android:id="@+id/voice"
-		android:layout_width="24dp"
-		android:layout_height="24dp"
-		android:contentDescription="@string/voice_announcements_content_description"
-		app:srcCompat="@drawable/voice"
-		tool:ignore="MissingConstraints" />
+    <androidx.constraintlayout.helper.widget.Flow
+        android:id="@+id/capabilities"
+        android:layout_width="0dp"
+        android:layout_height="wrap_content"
+        android:layout_marginStart="8dp"
+        android:layout_marginTop="16dp"
+        android:layout_marginEnd="8dp"
+        app:constraint_referenced_ids="ac,bike,voice,ticket,usb"
+        app:flow_horizontalGap="4dp"
+        app:flow_horizontalStyle="packed"
+        app:flow_verticalGap="4dp"
+        app:flow_wrapMode="chain"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/info" />
 
-	<ImageView
-		android:id="@+id/ticket"
-		android:layout_width="24dp"
-		android:layout_height="24dp"
-		android:contentDescription="@string/tickets_sold_content_description"
-		app:srcCompat="@drawable/ticket"
-		tool:ignore="MissingConstraints" />
+    <ImageView
+        android:id="@+id/ac"
+        android:layout_width="24dp"
+        android:layout_height="24dp"
+        android:contentDescription="@string/air_condition_content_description"
+        app:srcCompat="@drawable/ac"
+        tool:ignore="MissingConstraints" />
 
-	<ImageView
-		android:id="@+id/usb"
-		android:layout_width="24dp"
-		android:layout_height="24dp"
-		android:contentDescription="@string/usb_charging_content_description"
-		app:srcCompat="@drawable/usb"
-		tool:ignore="MissingConstraints" />
+    <ImageView
+        android:id="@+id/bike"
+        android:layout_width="24dp"
+        android:layout_height="24dp"
+        android:contentDescription="@string/bicycles_allowed_content_description"
+        app:srcCompat="@drawable/bike"
+        tool:ignore="MissingConstraints" />
 
-	<LinearLayout
-		android:layout_marginTop="8dp"
-		android:id="@+id/alerts"
-		android:layout_width="match_parent"
-		android:layout_height="wrap_content"
-		android:gravity="center_vertical"
-		android:visibility="gone"
-		android:background="@color/safety"
-		app:layout_constraintTop_toBottomOf="@+id/capabilities">
+    <ImageView
+        android:id="@+id/voice"
+        android:layout_width="24dp"
+        android:layout_height="24dp"
+        android:contentDescription="@string/voice_announcements_content_description"
+        app:srcCompat="@drawable/voice"
+        tool:ignore="MissingConstraints" />
 
-		<ImageView
-			android:layout_marginStart="8dp"
-			android:layout_width="wrap_content"
-			android:layout_height="wrap_content"
-			app:tint="@color/black"
-			android:importantForAccessibility="no"
-			android:src="@drawable/warning" />
+    <ImageView
+        android:id="@+id/ticket"
+        android:layout_width="24dp"
+        android:layout_height="24dp"
+        android:contentDescription="@string/tickets_sold_content_description"
+        app:srcCompat="@drawable/ticket"
+        tool:ignore="MissingConstraints" />
 
-		<com.google.android.material.textview.MaterialTextView
-			android:id="@+id/alerts_text"
-			android:layout_width="match_parent"
-			android:layout_height="wrap_content"
-			android:layout_margin="8dp"
-			android:padding="8dp"
-			android:textColor="@color/black"
-			tool:text="Severe stops on Metropolitan line towards Tower Hill through Victoria" />
-	</LinearLayout>
+    <ImageView
+        android:id="@+id/usb"
+        android:layout_width="24dp"
+        android:layout_height="24dp"
+        android:contentDescription="@string/usb_charging_content_description"
+        app:srcCompat="@drawable/usb"
+        tool:ignore="MissingConstraints" />
 
-	<org.osmdroid.views.MapView
-		android:id="@+id/map"
-		android:layout_width="match_parent"
-		android:layout_height="250dp"
-		android:layout_margin="16dp"
-		app:layout_constraintEnd_toEndOf="parent"
-		app:layout_constraintStart_toStartOf="parent"
-		app:layout_constraintTop_toBottomOf="@+id/alerts" />
+    <LinearLayout
+        android:id="@+id/alerts"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="8dp"
+        android:background="@color/safety"
+        android:gravity="center_vertical"
+        android:visibility="gone"
+        app:layout_constraintTop_toBottomOf="@+id/capabilities">
+
+        <ImageView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_marginStart="8dp"
+            android:importantForAccessibility="no"
+            android:src="@drawable/warning"
+            app:tint="@color/black" />
+
+        <com.google.android.material.textview.MaterialTextView
+            android:id="@+id/alerts_text"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_margin="8dp"
+            android:padding="8dp"
+            android:textColor="@color/black"
+            tool:text="Severe stops on Metropolitan line towards Tower Hill through Victoria" />
+    </LinearLayout>
+
+    <org.osmdroid.views.MapView
+        android:id="@+id/map"
+        android:layout_width="match_parent"
+        android:layout_height="250dp"
+        android:layout_margin="16dp"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@+id/alerts" />
 </androidx.constraintlayout.widget.ConstraintLayout>