Please sign in to comment.
Change cursor color when using selectionColor on Android
Summary: This matches the behavior on iOS, there was no way before to change the cursor color per input, it was only possible to change it globally via the theme. Ideally cursor color and selection color would be 2 different props but I think this is better than what we have (and matches iOS). Sadly there is no api to change it pragmatically (only possible via xml) so this uses reflection and can easily break so it is wrapped in a try catch to avoid crashes. I think it is better to just silently fail in this case. Definetly not super happy about the solution but I think it's worth adding since it is possible to do it natively using xml so it would suck not to be able to do it in RN. **Test plan** Tested that the cursor has the same color as before the change when not setting the prop and that it gets the selectionColor color when set. Closes #12280 Differential Revision: D4571858 Pulled By: astreet fbshipit-source-id: 7dca2db33a0a4eecb6115b45155549b1265ffbed
- Loading branch information...
Showing with 36 additions and 2 deletions.