Selected text now gets three entries in the system selection menu — look up, ask an assistant, and share — and the poem screen gains a share action of its own, next to the per-couplet save and copy. Compose 1.10 stopped routing SelectionContainer through LocalTextToolbar, so a custom entry cannot be added to that menu from inside the reader. ACTION_PROCESS_TEXT goes round it: the system builds part of the menu from installed activities handling that intent, so these appear here and in every other app. Three activity-aliases rather than one Ganjoor entry, because the menu is a place for verbs: a reader who means "look this up" should not have to pick an app first and then say what they wanted. "Ask an assistant" cannot name Claude or Gemini — only those apps can put their own name in that menu. It opens the share chooser with the question already written, which lists whichever assistant is installed. That hand-off is also what keeps this acceptable under F-Droid's rules: no vendor SDK, no API key, nothing but an intent the reader confirms. The activity is opaque and themed rather than a transparent one hosting a sheet. PROCESS_TEXT starts it in its own task, so the app the text came from is not behind this window, and a scrim over nothing is just a grey screen. WordLookup and AssistantAnswer are split out of their sheets so the same code serves as a sheet in the reader and a screen here. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
14 lines
480 B
XML
14 lines
480 B
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<resources>
|
|
|
|
<!--
|
|
The starting window Android shows before onCreate runs. MainActivity immediately repaints
|
|
it from the chosen theme, so this only has to cover light vs dark; values-night supplies
|
|
the other half.
|
|
-->
|
|
<style name="Theme.Ganjoorappandroid" parent="android:Theme.Material.Light.NoActionBar">
|
|
<item name="android:windowBackground">@color/window_background</item>
|
|
</style>
|
|
|
|
</resources>
|