diff --git a/.Jules/palette.md b/.Jules/palette.md index ec251fa..56db8e1 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -154,3 +154,7 @@ ## 2026-05-31 - Synchronous Interactive Initialization **Learning:** Interactive elements with dynamic text and secondary actions (like links or copy to clipboard) must have their full actionable `contentDescription` and custom `AccessibilityDelegateCompat` set synchronously during view initialization (not inside asynchronous blocks like coroutines). If delayed, screen readers lack context before the first data update. Furthermore, attaching an initial `OnClickListener` providing explicit feedback (e.g., a loading Toast) is essential if a user interacts with the UI element while it is functionally disabled during a loading state. **Action:** Always initialize accessibility properties and add temporary feedback listeners synchronously outside of asynchronous data fetching blocks to ensure complete accessibility and responsive feedback from the moment the view is created. + +## 2026-06-10 - Force LTR on Network Addresses +**Learning:** When an app supports RTL locales, the OS bidirectionality algorithms can mangle technical network strings like IP addresses and URLs (e.g., rendering `0.0.0.0:8080/cam.mjpeg` as `cam.mjpeg/8080:0.0.0.0`), destroying their readability and copy-paste accuracy. +**Action:** Always apply `android:textDirection="ltr"` to text views displaying URLs, IP addresses, or code snippets to guarantee they are rendered properly left-to-right, regardless of the user's localized system reading direction. diff --git a/app/src/main/res/layout/fragment_camera.xml b/app/src/main/res/layout/fragment_camera.xml index 7d31fca..411b654 100644 --- a/app/src/main/res/layout/fragment_camera.xml +++ b/app/src/main/res/layout/fragment_camera.xml @@ -332,6 +332,7 @@ android:padding="8dp" android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:text="@string/default_ip" + android:textDirection="ltr" android:textColor="@color/colorLink" android:drawableEnd="@drawable/ic_content_copy" android:drawableTint="@color/colorLink" @@ -374,6 +375,7 @@ android:padding="8dp" android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:text="@string/repo_url" + android:textDirection="ltr" android:textColorLink="@color/colorLink" android:drawableEnd="@drawable/ic_open_in_new" android:drawableTint="@color/colorLink"