From 57e30e575703e12f004c64e300a1d4f41c5c74c6 Mon Sep 17 00:00:00 2001 From: Ludovic Goix Date: Mon, 28 Sep 2020 23:36:06 -0400 Subject: [PATCH 1/4] simplified packet layout and try to fix the textview height --- .../main/res/layout/adapter_packet_layout.xml | 128 ++++++++++-------- app/src/main/res/layout/debug_fragment.xml | 5 +- 2 files changed, 76 insertions(+), 57 deletions(-) diff --git a/app/src/main/res/layout/adapter_packet_layout.xml b/app/src/main/res/layout/adapter_packet_layout.xml index f1e8beda1..e3f51da40 100644 --- a/app/src/main/res/layout/adapter_packet_layout.xml +++ b/app/src/main/res/layout/adapter_packet_layout.xml @@ -1,68 +1,84 @@ - + android:layout_margin="4dp"> - + android:layout_height="wrap_content"> - + + + + + android:layout_height="wrap_content" + android:layout_marginStart="8dp" + android:layout_marginTop="8dp" + android:layout_marginEnd="8dp" + android:layout_marginBottom="8dp" + android:fontFamily="monospace" + android:singleLine="false" + android:textAppearance="@style/TextAppearance.AppCompat.Small" + android:textIsSelectable="true" + android:textSize="8sp" + android:typeface="monospace" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/cloudDownloadIcon" + app:layout_constraintVertical_weight="1" + tools:text="# com.geeksville.mesh.MeshProtos$MeshPacket@1b1ea594\n + decoded {\n + position {\n + altitude: 60\n + battery_level: 81\n + latitude_i: 411111136\n + longitude_i: -711111805\n + time: 1600390966\n + }\n + }\n + from: -1409794164\n + hop_limit: 3\n + id: 1737414295\n + rx_snr: 9.5\n + rx_time: 316400569\n + to: -1409790708" /> - + - + + - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/debug_fragment.xml b/app/src/main/res/layout/debug_fragment.xml index 6aef5a358..9374ae282 100644 --- a/app/src/main/res/layout/debug_fragment.xml +++ b/app/src/main/res/layout/debug_fragment.xml @@ -11,11 +11,14 @@ android:layout_width="0dp" android:layout_height="0dp" android:layout_marginTop="8dp" + android:scrollbarAlwaysDrawVerticalTrack="true" android:scrollbars="vertical" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/clearButton" /> + app:layout_constraintTop_toBottomOf="@+id/clearButton" + tools:itemCount="8" + tools:listitem="@layout/adapter_packet_layout" />