From 9b5850870bef2770f281d51b5c96ac9103ab3667 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Tue, 11 Jan 2022 20:49:59 -0600 Subject: More layout tweaks and fixes --- .../TrackerMap/android/devices/UnitRenderData.kt | 5 +- .../src/main/res/layout/unit_map_fragment.xml | 62 ++++++++++++---------- androidApp/src/main/res/values/dimen.xml | 2 +- 3 files changed, 37 insertions(+), 32 deletions(-) (limited to 'androidApp/src/main') diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/UnitRenderData.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/UnitRenderData.kt index 1b23ba0..f9b7a27 100644 --- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/UnitRenderData.kt +++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/devices/UnitRenderData.kt @@ -147,14 +147,13 @@ class UnitRenderData { val imageLayout = GridLayout.LayoutParams() imageLayout.width = GridLayout.LayoutParams.WRAP_CONTENT imageLayout.height = GridLayout.LayoutParams.WRAP_CONTENT - imageLayout.setGravity(Gravity.CENTER_VERTICAL) imageLayout.marginEnd = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 6f, metrics).toInt() imageLayout.rowSpec = GridLayout.spec(i) imageLayout.columnSpec = GridLayout.spec(0) imageView.layoutParams = imageLayout - /* Property ext */ + /* Property text */ val textView = TextView(gridLayout.context) textView.text = detail.second @@ -167,6 +166,8 @@ class UnitRenderData { gridLayout.addView(imageView) gridLayout.addView(textView) + + imageLayout.setGravity(Gravity.CENTER) } actionCallback?.let { callback -> diff --git a/androidApp/src/main/res/layout/unit_map_fragment.xml b/androidApp/src/main/res/layout/unit_map_fragment.xml index a920b14..87eb4ac 100644 --- a/androidApp/src/main/res/layout/unit_map_fragment.xml +++ b/androidApp/src/main/res/layout/unit_map_fragment.xml @@ -31,50 +31,54 @@ app:contentPaddingRight="@dimen/card_padding" android:visibility="gone"> - - - - - - + android:orientation="horizontal"> + + + + + + + + + android:layout_height="wrap_content" /> - + diff --git a/androidApp/src/main/res/values/dimen.xml b/androidApp/src/main/res/values/dimen.xml index 9507352..8acc9a3 100644 --- a/androidApp/src/main/res/values/dimen.xml +++ b/androidApp/src/main/res/values/dimen.xml @@ -11,7 +11,7 @@ 16dp - 11sp + 12sp 8dp -- cgit v1.2.3