Skip to content
Closed
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
4 changes: 4 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<item android:state_focused="true">` with clear visual styling (e.g., a thick `<stroke>`) to indicate focus clearly.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/drawable/btn_ios_background.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
<corners android:radius="8dp"/>
</shape>
</item>
<item android:state_focused="true">
<shape android:shape="rectangle">
<solid android:color="#007AFF"/>
<corners android:radius="8dp"/>
<stroke android:width="2dp" android:color="#FFFFFF"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="#007AFF"/>
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/layout/fragment_camera.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

Expand Down Expand Up @@ -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"
Expand Down