diff --git a/.Jules/palette.md b/.Jules/palette.md index 33dd6d1..b399f58 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -41,3 +41,7 @@ ## 2025-10-21 - Localization of Interactive Feedback **Learning:** Found a hardcoded string `"Copied to clipboard"` used in a Toast message for interactive feedback. Hardcoded strings cannot be localized and are not accessible to non-English screen readers. **Action:** Always use string resources (`R.string.*`) for all user-facing text, including Toast messages and Snackbars, to ensure proper localization and accessibility support. + +## 2025-10-22 - Missing Visual Focus Indicators on Custom and Interactive Elements +**Learning:** Focusable `TextView` elements that display tooltips, and custom button background selectors, often lack explicit focus states (`android:state_focused="true"` or `?attr/selectableItemBackground`). This makes keyboard and directional pad navigation extremely difficult for users with mobility issues, as they cannot see which element is currently focused. +**Action:** Always ensure that any element marked `android:focusable="true"` has a defined visual focus state. For standard interactive `TextView`s, use `android:background="?attr/selectableItemBackground"`. For custom button background selectors, add a specific `` with clear visual styling (e.g., a thick ``) to indicate focus clearly. diff --git a/app/src/main/java/com/samsung/android/scan3d/fragments/CameraFragment.kt b/app/src/main/java/com/samsung/android/scan3d/fragments/CameraFragment.kt index 0dd2b8b..729eab8 100644 --- a/app/src/main/java/com/samsung/android/scan3d/fragments/CameraFragment.kt +++ b/app/src/main/java/com/samsung/android/scan3d/fragments/CameraFragment.kt @@ -334,6 +334,7 @@ class CameraFragment : Fragment() { .setPositiveButton(R.string.stop_confirmation_positive) { _, _ -> Log.i("CameraFrag", "KILL") val intent = Intent("KILL") //FILTER is a string to identify this intent + intent.setPackage(context?.packageName) context?.sendBroadcast(intent) } .setNegativeButton(R.string.stop_confirmation_negative, null) diff --git a/app/src/main/res/drawable/btn_ios_background.xml b/app/src/main/res/drawable/btn_ios_background.xml index 45737d3..204e80b 100644 --- a/app/src/main/res/drawable/btn_ios_background.xml +++ b/app/src/main/res/drawable/btn_ios_background.xml @@ -6,6 +6,13 @@ + + + + + + + diff --git a/app/src/main/res/layout/fragment_camera.xml b/app/src/main/res/layout/fragment_camera.xml index 84acb43..b9359a7 100644 --- a/app/src/main/res/layout/fragment_camera.xml +++ b/app/src/main/res/layout/fragment_camera.xml @@ -77,6 +77,7 @@ android:layout_height="wrap_content" android:layout_gravity="start|center_vertical" android:layout_weight="1" + android:background="?attr/selectableItemBackground" android:focusable="true" android:tooltipText="@string/frame_time_tooltip" /> @@ -251,6 +252,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" + android:background="?attr/selectableItemBackground" android:focusable="true" android:textColor="@color/colorPrimary" android:textSize="12sp"