-
Notifications
You must be signed in to change notification settings - Fork 57
Android Add option to change caret color in RichText in API 29+ #1787
Copy link
Copy link
Closed
Description
Describe the bug
The solution used as part of #1773 only supports API 27 and below in Android as reflection is not supported in API 28+.
Starting in API 29 there are the following supported methods that allow the cursor to be edited programmatically.
| Link | Attribute |
|---|---|
| TextView#setTextCursorDrawable | cursor |
| TextView.html#setTextSelectHandleLeft | Left selector icon |
| TextView.html#setTextSelectHandleRight | Right selector icon |
| TextView.html#setTextSelectHandle | Single selector icon |
Once Aztec View is updated to target API 29 support for the cursor drawable should be added to wrap up support for selectionColor
To Reproduce
Steps to reproduce the behavior:
- In Gutenberg add
selectionColorto a component that uses RichText - Add that field to a page or post
Expected behavior
The cursor should match the selectionColor
Screenshots
Cursor Color API 29:

Smartphone (please complete the following information):
- Device: Pixel 3a emulator
- OS: Android 10
- Version 29
Reactions are currently unavailable
