diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-04 18:42:13 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-04 18:44:37 -0600 |
commit | ea1863d4b7e6d09d0dc83eba47cbc1c4965b3bfd (patch) | |
tree | a2241ce7b26fba8bd5470b4e3b3ca8565af19619 /androidApp/src/main/res/layout | |
parent | 3d93d742c9dc05ff103a16739c08315ebb680a15 (diff) | |
download | etbsa-trackermap-mobile-ea1863d4b7e6d09d0dc83eba47cbc1c4965b3bfd.tar.gz etbsa-trackermap-mobile-ea1863d4b7e6d09d0dc83eba47cbc1c4965b3bfd.tar.bz2 etbsa-trackermap-mobile-ea1863d4b7e6d09d0dc83eba47cbc1c4965b3bfd.zip |
Fully implemented UnitMapFragment layout, moved MarkerType to commonMain and removed unnecessary content description warnings.
Diffstat (limited to 'androidApp/src/main/res/layout')
-rw-r--r-- | androidApp/src/main/res/layout/unit_item.xml | 7 | ||||
-rw-r--r-- | androidApp/src/main/res/layout/unit_map_fragment.xml | 163 |
2 files changed, 161 insertions, 9 deletions
diff --git a/androidApp/src/main/res/layout/unit_item.xml b/androidApp/src/main/res/layout/unit_item.xml index 8b6b667..c44ec56 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..763c7c9 100644 --- a/androidApp/src/main/res/layout/unit_map_fragment.xml +++ b/androidApp/src/main/res/layout/unit_map_fragment.xml @@ -26,22 +26,171 @@ 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="1000 Emerald Pools, CA" /> + + <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: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> |