Let marker list rows receive clicks with the Compose verse text - #303
Merged
Merged
Conversation
The AndroidComposeView inside VerseTextComposeView is focusable, and AbsListView skips item clicks and long clicks on a row that has a focusable descendant. The marker list is the one screen still on ListView, so tapping a marker stopped opening its verse. Block descendant focus on the display-only view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WA4GsUvVWoZX8kwb2ESu6R
📱 Preview buildsSigned release builds of
Or open https://75fe00e9-alkitab-pr.yukuku.workers.dev on an Android device. These share their application IDs and signature with the Play Store builds, so installing one replaces the corresponding installed app (data is kept). This comment tracks the latest build for this PR; earlier builds keep their own URLs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
With the Compose verse rendering on (the default), tapping a row in the marker list (bookmarks, notes, highlights) does nothing: it does not open the verse. Long-press to enter selection mode is broken the same way.
Cause
VerseTextSlotswaps each row's snippetTextViewfor aVerseTextComposeView. TheAndroidComposeViewthat Compose puts inside it is focusable.AbsListViewskips item clicks and long clicks on any row wherehasExplicitFocusable()is true, soMarkerListActivity'sOnItemClickListenernever fires. The search results and progress-mark list use aRecyclerViewwithsetOnClickListeneron the item view, so they were not affected. The marker list is the only screen still onListView.Fix
VerseTextComposeViewnow setsdescendantFocusability = FOCUS_BLOCK_DESCENDANTS. The view only displays text, so nothing inside it needs focus.Testing
VerseTextComposeTestattaches a row with a Compose slot to an activity and checks thatrow.hasExplicitFocusable()is false. It failed before the fix and passes after it../gradlew assemblePlainDebug testPlainDebugUnitTestpasses locally.🤖 Generated with Claude Code
https://claude.ai/code/session_01WA4GsUvVWoZX8kwb2ESu6R
Generated by Claude Code