From cefd05253392861b44ceeac2b0333e81c4716ebd Mon Sep 17 00:00:00 2001
From: "google-labs-jules[bot]"
<161369871+google-labs-jules[bot]@users.noreply.github.com>
Date: Tue, 24 Mar 2026 20:26:54 +0000
Subject: [PATCH] style: fix TableLayout column spanning and button width
- Grouped `switch1`, `switch2`, and `switchRTSP` into a spanning `` to prevent them from unintentionally forcing a 3rd table column, which broke the UI alignment.
- Added `android:layout_span="2"` to the divider `` to ensure it acts as a proper full-width separator across the 2-column layout.
- Removed the inaccessible `android:minWidth="10dp"` constraint on the `buttonKill` (STOP button) to ensure it can utilize proper accessible minimum touch target defaults.
- Added spacing between the grouped switches.
Co-authored-by: manupawickramasinghe <73810867+manupawickramasinghe@users.noreply.github.com>
---
.Jules/palette.md | 3 +
app/src/main/res/layout/fragment_camera.xml | 71 ++++++++++++---------
2 files changed, 43 insertions(+), 31 deletions(-)
diff --git a/.Jules/palette.md b/.Jules/palette.md
index 5e11fe1..d53062b 100644
--- a/.Jules/palette.md
+++ b/.Jules/palette.md
@@ -79,3 +79,6 @@
## 2026-03-23 - Dynamic Accessibility Properties
**Learning:** Added a static `android:contentDescription` to a TextView meant to display dynamic text (frame time/bitrate), which caused TalkBack to permanently read the static description instead of the updated live data.
**Action:** Never set static `android:contentDescription` in XML for elements whose content dynamically updates. The screen reader will prioritize the static XML property over the updated text.
+## 2026-05-15 - TableLayout Alignment & Spanning
+**Learning:** Found multiple switches stacked in a TableRow causing misaligned columns and visual clutter because the third switch forced a single-element 3rd column, which cascaded to ruin the spacing of the whole layout. Additionally, a divider View lacked `android:layout_span="2"`, preventing it from stretching across the 2-column layout.
+**Action:** Always group related interactive elements in a single spanning parent container (like `LinearLayout` with `android:layout_span`) when placing them in a `TableRow` to prevent them from unintentionally breaking the tabular column structure. And ensure decorative views like dividers also span all columns.
diff --git a/app/src/main/res/layout/fragment_camera.xml b/app/src/main/res/layout/fragment_camera.xml
index aca3967..7ddb4cf 100644
--- a/app/src/main/res/layout/fragment_camera.xml
+++ b/app/src/main/res/layout/fragment_camera.xml
@@ -90,7 +90,6 @@
android:layout_gravity="end|fill_vertical"
android:layout_weight="1"
android:includeFontPadding="false"
- android:minWidth="10dp"
android:text="@string/stop_button" />
@@ -105,6 +104,7 @@
android:importantForAccessibility="no"
android:layout_width="match_parent"
android:layout_height="1dp"
+ android:layout_span="2"
android:layout_marginTop="0pt"
android:layout_marginBottom="4pt"
android:background="#FFAA00"
@@ -119,36 +119,45 @@
android:background="#393939"
android:padding="4dp">
-
-
-
-
-
+
+
+
+
+
+
+
+