From ee9e673695e221e115758b1ac32a6b63683ae7c9 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Tue, 11 Jan 2022 20:05:03 -0600 Subject: unit_item.xml data fields are generated programmatically, and DevicesAdapter code was refactored into UnitRenderData to be shared with UnitMapFragment. --- androidApp/src/main/res/layout/unit_item.xml | 136 +++++---------------- .../src/main/res/layout/unit_map_fragment.xml | 89 +------------- 2 files changed, 33 insertions(+), 192 deletions(-) (limited to 'androidApp/src/main/res/layout') diff --git a/androidApp/src/main/res/layout/unit_item.xml b/androidApp/src/main/res/layout/unit_item.xml index d9432ba..d46e7a1 100644 --- a/androidApp/src/main/res/layout/unit_item.xml +++ b/androidApp/src/main/res/layout/unit_item.xml @@ -15,9 +15,7 @@ android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="end" - android:paddingTop="@dimen/card_padding" - android:paddingBottom="@dimen/card_padding" - android:paddingHorizontal="@dimen/card_padding" + android:padding="@dimen/card_padding" android:gravity="center" android:orientation="horizontal" android:visibility="visible"> @@ -31,18 +29,17 @@ android:text="@string/unit_details" android:textColor="@color/colorAccent" android:textSize="@dimen/card_action_text" - style="?borderlessButtonStyle"/> + style="?android:borderlessButtonStyle"/> + style="?android:borderlessButtonStyle"/> + style="?android:borderlessButtonStyle" /> @@ -70,127 +67,52 @@ android:clickable="true" android:focusable="true"> - + android:orientation="vertical"> - - - - - - - - - - - + android:gravity="center_vertical" + android:orientation="horizontal"> - - + android:layout_marginEnd="5dp" + android:src="@drawable/device_status" + app:tint="?android:textColorPrimary" + tools:ignore="ContentDescription" /> + android:visibility="gone" + android:layout_marginEnd="5dp" + android:src="@drawable/device_unlocked" + tools:ignore="ContentDescription" /> - - + style="@style/TextAppearance.AppCompat.Body2" + tools:text="1AAUTO" /> + - - - + - + diff --git a/androidApp/src/main/res/layout/unit_map_fragment.xml b/androidApp/src/main/res/layout/unit_map_fragment.xml index 213d33d..a920b14 100644 --- a/androidApp/src/main/res/layout/unit_map_fragment.xml +++ b/androidApp/src/main/res/layout/unit_map_fragment.xml @@ -68,87 +68,7 @@ android:id="@+id/gridLayout" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_below="@id/unitName"> - - - - - - - - - - - - - - - - - - + android:layout_below="@id/unitName" /> + style="?android:borderlessButtonStyle" /> + style="?android:borderlessButtonStyle" /> + style="?android:borderlessButtonStyle" /> -- cgit v1.2.3