Bend Android text to your whim.
Textbender is an Android app which lets you shuffle text from various sources to various sources. In more concrete terms, it lets you do things like turn all text on your screen into buttons you can press to open them in a dictionary like Yomichan or Pleco.
The most notable feature is the ability to retrieve any text on the screen visible to the accessibility API.
You can also access text from other sources; another commonly used one might be via the context menu.
Some apps don’t play nice with Android and only allow you to copy text. Textbender has that covered:
You can also do things like integrate Textbender with your Anki notes to open a word in Yomichan.
There’s more you can do that isn’t demonstrated in this list; for example, instead of opening dictionary apps directly, you can have the overlay buttons copy to the clipboard or send them to another app via the share menu.
Textbender can be downloaded from the Releases page. It is also unofficially hosted on the IzzyOnDroid repo here. I plan on adding it to F-Droid when I can muster the energy.
The text button overlay and clipboard are two features that require user interaction to start.
If you activate the accessibility shortcut, Textbender will open the button overlay. This shortcut can take the form of a floating button or a gesture. See the official Android documentation for more information.
You can configure Textbender to use a floating set of buttons, configurable to show a button for the button overlay, clipboard, or both. Note that this is different from the accessibility shortcut button described above.
Textbender adds some quick settings tiles to activate the text button overlay, bend the clipboard text, or toggle the floating buttons described above.
Some devices (e.g. Google Pixel 5) have the ability to use gestures across the fingerprint sensor as shortcuts. If you have a supported device, you can configure Textbender to either open the button overlay or bend the clipboard depending on which direction you swipe.
Textbender accepts URLs with the format textbender://x?x={text}
, where
{text}
is the text to bend. You can edit your Anki card template to add a link
to your note. For example, to add a link to open a note field named
“Expression”…
<a href="https://github.com/elizagamedev/android-textbender/blob/main/textbender://x?x={{text:Expression}}">Open in Yomichan</a>
The URL format will replace any instances of the string {text}
with the text
to be bent. For example, the URL format https://duckduckgo.com/q={text}
, when
bent with the source text foo
, will open the URL
https://duckduckgo.com/q=foo
.
The Yomichan integration works by automating the process of opening the search page in Yomichan with the given text, since it is not possible for an external app to otherwise directly open a browser page to an addon. It has the following requirements:
The Textbender dev environment is provided as a Nix flake and is very easy to build with Nix.
nix develop
./gradlew installDebug
It’s really that simple. (Assuming you have Nix set up correctly.)