From 2b3c45a4dbd6e80e8d81884b4a6492df306f5664 Mon Sep 17 00:00:00 2001 From: Ross Golder Date: Tue, 6 Oct 2026 13:05:42 +0700 Subject: [PATCH] Give the activity log room on a short viewport MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The log card was 0dp pinned between the buttons and the bottom of the parent, so it took whatever was left over. On a 1080-tall landscape screen that was 150 units — about one row — with no way to scroll to the rest of the history. Measured, not assumed: the same card was 83 units before the status card shrank. The stack is now inside a NestedScrollView with fillViewport, and the log keeps a 180dp minimum. A tall viewport still fills it, because fillViewport stretches the child and the weighted card takes the remainder; a short one scrolls instead of crushing it. Verified on a device in both orientations. In landscape the log now shows entries where it previously showed one, and in portrait the card fills the remaining height as before. --- .../src/main/res/layout/activity_main.xml | 259 +++++++++--------- 1 file changed, 134 insertions(+), 125 deletions(-) diff --git a/sms2webhook/src/main/res/layout/activity_main.xml b/sms2webhook/src/main/res/layout/activity_main.xml index 574980c..ef1633b 100644 --- a/sms2webhook/src/main/res/layout/activity_main.xml +++ b/sms2webhook/src/main/res/layout/activity_main.xml @@ -1,155 +1,164 @@ - - + - - - - - + android:orientation="vertical"> - + + + + + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + app:cardCornerRadius="12dp" + app:cardElevation="4dp"> - + android:orientation="vertical" + android:padding="16dp"> - + - + - + - - - - + - + - - + android:layout_marginStart="16dp" + android:layout_marginTop="8dp" + android:layout_marginEnd="16dp" + android:gravity="center" + android:orientation="horizontal"> + + + + - - + - + - - - - - - + + + android:layout_height="match_parent" + android:orientation="vertical"> - + + + + + android:layout_height="0dp" + android:layout_weight="1"> - + - + + + - + + + - \ No newline at end of file + \ No newline at end of file