From af0cd5864c5bf18d9bde40210344eda4013915ff Mon Sep 17 00:00:00 2001 From: tekstrand Date: Thu, 24 Sep 2026 17:50:29 -0500 Subject: [PATCH] Merged the Decodes tab into the Monitor tab. The decode list now sits in the Monitor screen, embedded through a FragmentContainerView, so its reply, copy, clock sync and clear behave as they did on their own tab. The Decodes entry is gone from the bottom bar, the nav rail and the navigation graph, leaving Monitor, Messages, Transmit and Settings, and its label string and icon went with it. In portrait the list goes under the waterfall and the status strip, with the waterfall taking 1.1 of the height to the list's 1. On a phone in landscape the screen is too short to stack all three, so the waterfall and the strip take the left half and the list runs the full height on the right. A tablet in landscape has the height, so it stays stacked with the list taking 1.3 to the waterfall's 1. The stacked split lives in float resources so portrait and tablet landscape share the numbers. The list's own toolbar and floating clear button took about 110dp that a short screen cannot spare; stacked in phone landscape they left room for about one row. The list is now a card with a header strip in the same idiom as the Transmit tab's Queue card, and clear is an icon button in that strip. The card's spacing comes from its container, so in the side-by-side layout its top lines up with the waterfall's. Verified on the phone emulator with decodes injected through a debug-only harness that is not part of this change: rows show, survive a round trip through the other tabs and a rotation, Reply opens Transmit with the callsign filled in, and clear empties the list. Portrait, phone landscape, and a 1280x800dp tablet-sized landscape all lay out as intended, and the side-by-side layout was checked on a Pixel 8a. --- .../com/js8call/example/ui/DecodeFragment.kt | 9 +- .../app/src/main/res/drawable/ic_delete.xml | 10 ++ .../app/src/main/res/drawable/ic_notes.xml | 13 -- .../main/res/layout-land/fragment_monitor.xml | 40 ++++++ .../layout-sw600dp-land/fragment_monitor.xml | 31 +++++ .../src/main/res/layout/fragment_decodes.xml | 121 ++++++++++-------- .../src/main/res/layout/fragment_monitor.xml | 12 +- .../app/src/main/res/menu/bottom_nav_menu.xml | 5 - .../main/res/navigation/mobile_navigation.xml | 5 - .../main/res/values-sw600dp-land/dimens.xml | 5 + android/app/src/main/res/values/dimens.xml | 6 + android/app/src/main/res/values/strings.xml | 1 - 12 files changed, 173 insertions(+), 85 deletions(-) create mode 100644 android/app/src/main/res/drawable/ic_delete.xml delete mode 100644 android/app/src/main/res/drawable/ic_notes.xml create mode 100644 android/app/src/main/res/layout-land/fragment_monitor.xml create mode 100644 android/app/src/main/res/layout-sw600dp-land/fragment_monitor.xml create mode 100644 android/app/src/main/res/values-sw600dp-land/dimens.xml create mode 100644 android/app/src/main/res/values/dimens.xml diff --git a/android/app/src/main/java/com/js8call/example/ui/DecodeFragment.kt b/android/app/src/main/java/com/js8call/example/ui/DecodeFragment.kt index e46303707..ba96bc41f 100644 --- a/android/app/src/main/java/com/js8call/example/ui/DecodeFragment.kt +++ b/android/app/src/main/java/com/js8call/example/ui/DecodeFragment.kt @@ -13,7 +13,6 @@ import androidx.lifecycle.ViewModelProvider import androidx.navigation.fragment.findNavController import androidx.recyclerview.widget.RecyclerView import com.google.android.material.dialog.MaterialAlertDialogBuilder -import com.google.android.material.floatingactionbutton.FloatingActionButton import com.google.android.material.navigation.NavigationBarView import com.google.android.material.snackbar.Snackbar import com.js8call.example.R @@ -29,7 +28,7 @@ class DecodeFragment : Fragment() { private lateinit var recyclerView: RecyclerView private lateinit var emptyText: TextView - private lateinit var clearFab: FloatingActionButton + private lateinit var clearButton: View private var myGroups: Set = emptySet() @@ -66,7 +65,7 @@ class DecodeFragment : Fragment() { // Find views recyclerView = view.findViewById(R.id.decodes_recycler_view) emptyText = view.findViewById(R.id.empty_text) - clearFab = view.findViewById(R.id.clear_fab) + clearButton = view.findViewById(R.id.clear_button) // Set up RecyclerView adapter = DecodeListAdapter().apply { @@ -80,8 +79,8 @@ class DecodeFragment : Fragment() { } recyclerView.adapter = adapter - // Set up FAB - clearFab.setOnClickListener { + // Set up clear button + clearButton.setOnClickListener { confirmClearDecodes() } diff --git a/android/app/src/main/res/drawable/ic_delete.xml b/android/app/src/main/res/drawable/ic_delete.xml new file mode 100644 index 000000000..1a9f6dd18 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_delete.xml @@ -0,0 +1,10 @@ + + + + diff --git a/android/app/src/main/res/drawable/ic_notes.xml b/android/app/src/main/res/drawable/ic_notes.xml deleted file mode 100644 index eb0f830ce..000000000 --- a/android/app/src/main/res/drawable/ic_notes.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - diff --git a/android/app/src/main/res/layout-land/fragment_monitor.xml b/android/app/src/main/res/layout-land/fragment_monitor.xml new file mode 100644 index 000000000..bc35e0df7 --- /dev/null +++ b/android/app/src/main/res/layout-land/fragment_monitor.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/res/layout-sw600dp-land/fragment_monitor.xml b/android/app/src/main/res/layout-sw600dp-land/fragment_monitor.xml new file mode 100644 index 000000000..ebdfc41ec --- /dev/null +++ b/android/app/src/main/res/layout-sw600dp-land/fragment_monitor.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + diff --git a/android/app/src/main/res/layout/fragment_decodes.xml b/android/app/src/main/res/layout/fragment_decodes.xml index f947eb3c7..dbac8c5d2 100644 --- a/android/app/src/main/res/layout/fragment_decodes.xml +++ b/android/app/src/main/res/layout/fragment_decodes.xml @@ -1,59 +1,70 @@ - - - - - - - - - - - - - - - + android:layout_height="match_parent" + app:cardElevation="2dp"> + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/res/layout/fragment_monitor.xml b/android/app/src/main/res/layout/fragment_monitor.xml index 8027683c2..ebdfc41ec 100644 --- a/android/app/src/main/res/layout/fragment_monitor.xml +++ b/android/app/src/main/res/layout/fragment_monitor.xml @@ -9,7 +9,7 @@ android:id="@+id/waterfall_view" android:layout_width="match_parent" android:layout_height="0dp" - android:layout_weight="1" + android:layout_weight="@dimen/monitor_waterfall_weight" android:background="@color/waterfall_background" /> @@ -18,4 +18,14 @@ android:layout_width="match_parent" android:layout_height="wrap_content" /> + + + diff --git a/android/app/src/main/res/menu/bottom_nav_menu.xml b/android/app/src/main/res/menu/bottom_nav_menu.xml index 7e839152c..426600c97 100644 --- a/android/app/src/main/res/menu/bottom_nav_menu.xml +++ b/android/app/src/main/res/menu/bottom_nav_menu.xml @@ -5,11 +5,6 @@ android:icon="@drawable/ic_graphic_eq" android:title="@string/nav_monitor" /> - - - - + + 1 + 1.3 + diff --git a/android/app/src/main/res/values/dimens.xml b/android/app/src/main/res/values/dimens.xml new file mode 100644 index 000000000..1e5290024 --- /dev/null +++ b/android/app/src/main/res/values/dimens.xml @@ -0,0 +1,6 @@ + + + + 1.1 + 1 + diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml index 259044c55..c3f684f7b 100644 --- a/android/app/src/main/res/values/strings.xml +++ b/android/app/src/main/res/values/strings.xml @@ -4,7 +4,6 @@ Monitor - Decodes Messages Transmit Settings