diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-01-13 04:18:54 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-01-13 04:18:54 -0600 |
commit | 15c8f18da01b661d4f23dc25bee0b4b31355bbea (patch) | |
tree | 28b4e3f62bc8e707572e9710675e92f741fc3113 /androidApp/src/main/res/layout | |
parent | 5e07a10d16501ec047a021ddef52d22474375a2a (diff) | |
download | etbsa-trackermap-mobile-15c8f18da01b661d4f23dc25bee0b4b31355bbea.tar.gz etbsa-trackermap-mobile-15c8f18da01b661d4f23dc25bee0b4b31355bbea.tar.bz2 etbsa-trackermap-mobile-15c8f18da01b661d4f23dc25bee0b4b31355bbea.zip |
Added device icon to unit_item.xml (+ a11y) and moved category logic to MarkerTransformations
Diffstat (limited to 'androidApp/src/main/res/layout')
-rw-r--r-- | androidApp/src/main/res/layout/unit_item.xml | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/androidApp/src/main/res/layout/unit_item.xml b/androidApp/src/main/res/layout/unit_item.xml index e827940..833e56b 100644 --- a/androidApp/src/main/res/layout/unit_item.xml +++ b/androidApp/src/main/res/layout/unit_item.xml @@ -57,18 +57,33 @@ android:clickable="true" android:focusable="true"> - <LinearLayout + <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/mainContent" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical"> + <ImageView + android:id="@+id/unitIcon" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:padding="@dimen/card_icon_padding" + android:paddingStart="0dp" + android:src="@drawable/map_default" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + tools:ignore="ContentDescription,RtlSymmetry" /> + <LinearLayout android:id="@+id/titleLayout" - android:layout_width="match_parent" + android:layout_width="0dp" android:layout_height="wrap_content" android:gravity="center_vertical" - android:orientation="horizontal"> + android:orientation="horizontal" + app:layout_constraintStart_toEndOf="@id/unitIcon" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent"> <ImageView android:id="@+id/statusIcon" @@ -83,26 +98,30 @@ android:id="@+id/engineStopIcon" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:visibility="gone" android:layout_marginEnd="5dp" android:src="@drawable/device_unlocked" + android:visibility="gone" tools:ignore="ContentDescription" /> <TextView android:id="@+id/unitName" + style="@style/TextAppearance.AppCompat.Body2" android:layout_width="match_parent" android:layout_height="wrap_content" - style="@style/TextAppearance.AppCompat.Body2" tools:text="1AAUTO" /> </LinearLayout> <GridLayout android:id="@+id/gridLayout" - android:layout_width="match_parent" - android:layout_height="wrap_content" /> + android:layout_width="0dp" + android:layout_height="wrap_content" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@id/unitIcon" + app:layout_constraintTop_toBottomOf="@id/titleLayout" + app:layout_constraintBottom_toBottomOf="parent"/> - </LinearLayout> + </androidx.constraintlayout.widget.ConstraintLayout> </com.google.android.material.card.MaterialCardView> |