In android we can change the cursor color via:
android:textCursorDrawable=\"@drawable/black_color_cursor\".
android:textCursorDrawable=\"@drawable/black_color_cursor\"
How can we do this dynamically?
2019 Updated: working smooth and easy https://material.io/develop/android/docs/getting-started/
If you are using material component just simply use textCursorDrawable with color or your custom drawable.
textCursorDrawable