Skip to content
This repository was archived by the owner on Jul 9, 2026. It is now read-only.
This repository was archived by the owner on Jul 9, 2026. It is now read-only.

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

Closed

Description

@chipsnyder

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

Activity

  1. antonis commented on Jan 24, 2022

    @antonis

    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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions