Fix selectionColor doesn't style Android TextInput selection handles #31007
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This issue fixes #30283 selectionColor does not change the handles color.
The method setCursorColor changes the cursor color of field
mCursorDrawable
using a reflection for Android Devices lower then API 28. This fix adds a reflection to change color of the left, center and right handles of a selection (mTextSelectHandleLeftRes, mTextSelectHandleRes and mTextSelectHandleRightRes).Changelog
[Android] [Fixed] - Fix selectionColor doesn't style Android TextInput selection handles
Test Plan
This changes fix the Java API for which I can not write Java tests as explained in commit 709a441
The java TextInputTest was excluded from the test suite in commit 709a441 as they need the Yoga libraries to run
CLICK TO OPEN TESTS RESULTS - API 22
left/right handles do not change color with the cursor
center Handle color does not change color
The left and right handle change color with the cursor color
The center handle color is correctly updated
setCursorColor
changes correctly the cursor colorDefault Colors do not have issues