aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/res
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-04 18:42:13 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-04 18:42:13 -0600
commit4993bd82de10a6b7b9d8101dc024cf2d404dc016 (patch)
treea4e02af8c34e030e2e7623695ce5ccb7e861cb2d /androidApp/src/main/res
parent3e209110761b6ec3578675cbdfe4fdbdf5a10f91 (diff)
downloadetbsa-trackermap-mobile-4993bd82de10a6b7b9d8101dc024cf2d404dc016.tar.gz
etbsa-trackermap-mobile-4993bd82de10a6b7b9d8101dc024cf2d404dc016.tar.bz2
etbsa-trackermap-mobile-4993bd82de10a6b7b9d8101dc024cf2d404dc016.zip
Fully implemented UnitMapFragment layout, moved MarkerType to commonMain and removed unnecessary content description warnings.
Diffstat (limited to 'androidApp/src/main/res')
-rw-r--r--androidApp/src/main/res/layout/unit_item.xml7
-rw-r--r--androidApp/src/main/res/layout/unit_map_fragment.xml164
2 files changed, 162 insertions, 9 deletions
diff --git a/androidApp/src/main/res/layout/unit_item.xml b/androidApp/src/main/res/layout/unit_item.xml
index 9296534..96011b9 100644
--- a/androidApp/src/main/res/layout/unit_item.xml
+++ b/androidApp/src/main/res/layout/unit_item.xml
@@ -17,6 +17,7 @@
android:layout_gravity="end"
android:paddingTop="@dimen/card_padding"
android:paddingBottom="@dimen/card_padding"
+ android:paddingStart="@dimen/card_padding"
android:paddingEnd="@dimen/card_padding"
android:gravity="center"
android:orientation="horizontal"
@@ -82,7 +83,8 @@
android:layout_height="wrap_content"
android:layout_marginEnd="5dp"
android:src="@drawable/ic_baseline_fiber_manual_record_24"
- app:tint="?android:textColorPrimary" />
+ app:tint="?android:textColorPrimary"
+ tools:ignore="ContentDescription" />
<ImageView
android:id="@+id/engineStopIcon"
@@ -91,7 +93,8 @@
android:layout_toEndOf="@id/statusIcon"
android:visibility="gone"
android:layout_marginEnd="5dp"
- android:src="@drawable/ic_baseline_lock_24" />
+ android:src="@drawable/ic_baseline_lock_24"
+ tools:ignore="ContentDescription" />
<TextView
android:id="@+id/unitName"
diff --git a/androidApp/src/main/res/layout/unit_map_fragment.xml b/androidApp/src/main/res/layout/unit_map_fragment.xml
index f2d54e6..dbbb0b2 100644
--- a/androidApp/src/main/res/layout/unit_map_fragment.xml
+++ b/androidApp/src/main/res/layout/unit_map_fragment.xml
@@ -26,22 +26,172 @@
app:cardUseCompatPadding="true"
app:cardElevation="@dimen/card_elevation"
app:cardCornerRadius="@dimen/card_border_radius"
- app:contentPadding="@dimen/card_padding"
+ app:contentPaddingTop="@dimen/card_padding"
+ app:contentPaddingLeft="@dimen/card_padding"
+ app:contentPaddingRight="@dimen/card_padding"
android:visibility="gone">
- <LinearLayout
+ <RelativeLayout
+ android:id="@+id/mainContent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:animateLayoutChanges="true">
+
+ <ImageView
+ android:id="@+id/statusIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="5dp"
+ android:src="@drawable/ic_baseline_fiber_manual_record_24"
+ app:tint="?android:textColorPrimary"
+ tools:ignore="ContentDescription" />
+
+ <ImageView
+ android:id="@+id/engineStopIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_toEndOf="@id/statusIcon"
+ android:visibility="gone"
+ android:layout_marginEnd="5dp"
+ android:src="@drawable/ic_baseline_lock_24"
+ tools:ignore="ContentDescription" />
<TextView
- android:id="@+id/unitInfoTest"
+ android:id="@+id/unitName"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_toEndOf="@id/engineStopIcon"
+ style="@style/TextAppearance.AppCompat.Body2"
+ tools:text="1AAUTO" />
+
+ <GridLayout
+ android:id="@+id/gridLayout"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_below="@id/unitName">
+
+ <ImageView
+ android:id="@+id/driverNameIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginEnd="6dp"
+ android:layout_column="0"
+ android:layout_row="1"
+ android:contentDescription="@string/unit_driver_name"
+ android:src="@drawable/ic_baseline_person_24"
+ app:tint="?android:textColorSecondary" />
+
+ <TextView
+ android:id="@+id/driverName"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_column="1"
+ android:layout_row="1"
+ style="@style/TextAppearance.AppCompat.Caption"
+ tools:text="Javier Zavala" />
+
+ <ImageView
+ android:id="@+id/unitSpeedIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="0"
+ android:layout_row="2"
+ style="@style/TextAppearance.MaterialComponents.Caption"
+ android:contentDescription="@string/unit_speed"
+ android:src="@drawable/ic_baseline_speed_24"
+ app:tint="?android:textColorSecondary" />
+
+ <TextView
+ android:id="@+id/unitSpeed"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_column="1"
+ android:layout_row="2"
+ style="@style/TextAppearance.AppCompat.Caption"
+ tools:text="0 Km/h - Stopped" />
+
+ <ImageView
+ android:id="@+id/lastAddressIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="0"
+ android:layout_row="3"
+ android:contentDescription="@string/unit_last_address"
+ android:src="@drawable/ic_baseline_location_on_24"
+ app:tint="?android:textColorSecondary" />
+
+ <TextView
+ android:id="@+id/lastAddress"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_column="1"
+ android:layout_row="3"
+ style="@style/TextAppearance.AppCompat.Caption"
+ tools:text="404 Av. Arboledas, Celaya, Gto." />
+
+ <ImageView
+ android:id="@+id/lastDateIcon"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_column="0"
+ android:layout_row="4"
+ android:contentDescription="@string/unit_last_date"
+ android:src="@drawable/ic_baseline_calendar_today_24"
+ app:tint="?android:textColorSecondary" />
+
+
+ <TextView
+ android:id="@+id/lastDate"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_column="1"
+ android:layout_row="4"
+ style="@style/TextAppearance.AppCompat.Caption"
+ tools:text="4 de Diciembre de 2021, 7:00 PM" />
+
+ </GridLayout>
+
+ <LinearLayout
+ android:id="@+id/itemOptions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- tools:text="SELECTED UNIT"
- android:gravity="center"/>
+ android:layout_below="@id/gridLayout"
+ android:layout_marginTop="@dimen/card_padding"
+ android:gravity="center"
+ android:orientation="horizontal"
+ android:visibility="visible">
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/detailsButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/unit_details"
+ android:textColor="@color/colorAccent"
+ style="?borderlessButtonStyle" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/reportsButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginHorizontal="8dp"
+ android:layout_weight="1"
+ android:text="@string/unit_reports"
+ android:textColor="@color/colorAccent"
+ style="?borderlessButtonStyle" />
+
+ <com.google.android.material.button.MaterialButton
+ android:id="@+id/commandsButton"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:text="@string/unit_commands"
+ android:textColor="@color/colorAccent"
+ style="?borderlessButtonStyle" />
+
+ </LinearLayout>
- </LinearLayout>
+ </RelativeLayout>
</androidx.cardview.widget.CardView>