Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
71 changes: 40 additions & 31 deletions app/src/main/res/layout/fragment_camera.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />
</LinearLayout>

Expand All @@ -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"
Expand All @@ -119,36 +119,45 @@
android:background="#393939"
android:padding="4dp">

<Switch
android:id="@+id/switch1"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="start"
android:checked="true"
android:splitTrack="false"
android:text="@string/preview_label"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="#C1C1C1" />

<Switch
android:id="@+id/switch2"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="start"
android:checked="false"
android:text="@string/stream_label"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="#C1C1C1" />

<Switch
android:id="@+id/switchRTSP"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="start"
android:checked="false"
android:text="@string/rtsp_label"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="#C1C1C1" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_span="2"
android:orientation="horizontal">

<Switch
android:id="@+id/switch1"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="start"
android:layout_marginEnd="16dp"
android:checked="true"
android:splitTrack="false"
android:text="@string/preview_label"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="#C1C1C1" />

<Switch
android:id="@+id/switch2"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="start"
android:layout_marginEnd="16dp"
android:checked="false"
android:text="@string/stream_label"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="#C1C1C1" />

<Switch
android:id="@+id/switchRTSP"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:layout_gravity="start"
android:checked="false"
android:text="@string/rtsp_label"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="#C1C1C1" />
</LinearLayout>
</TableRow>

<TableRow
Expand Down