Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Add option to change caret color in RichText in API 29+ #1787

Closed
chipsnyder opened this issue Jan 20, 2020 · 1 comment
Closed

Android Add option to change caret color in RichText in API 29+ #1787

chipsnyder opened this issue Jan 20, 2020 · 1 comment

Comments

@chipsnyder
Copy link
Contributor

chipsnyder commented Jan 20, 2020

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:

  1. In Gutenberg add selectionColor to a component that uses RichText
  2. Add that field to a page or post

Expected behavior
The cursor should match the selectionColor

Screenshots
Cursor Color API 29:

Highlight Color API 29:

Smartphone (please complete the following information):

  • Device: Pixel 3a emulator
  • OS: Android 10
  • Version 29
@antonis
Copy link

antonis commented Jan 24, 2022

Closing the issue as the it seems to be fixed now. Please reopen if that is not the case.

Screenshot
Selection Cursor
device-2022-01-24-121128 device-2022-01-24-121424

@antonis antonis closed this as completed Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants