I try to change the cursor color on a Xamarin Forms Entry. So far I followed the solution by this Forum Post:
https://forums.xamarin.com/discussion/138361/change-cursor-color-in-entry
Which is this code in a custom renderer:
IntPtr IntPtrtextViewClass = JNIEnv.FindClass(typeof(TextView));
IntPtr mCursorDrawableResProperty = JNIEnv.GetFieldID(IntPtrtextViewClass, "mCursorDrawableRes", "I");
// my_cursor is the xml file name which we defined above
JNIEnv.SetField(Control.Handle, mCursorDrawableResProperty, Resource.Drawable.my_cursor);
Unfortunately this doesn't work anymore on my Android Q Emulator / Device. I get this exception:
Java.Lang.NoSuchFieldError: no "I" field "mCursorDrawableRes" in class "Landroid/widget/TextView;"
Is there another way to do it?
Sample: https://1drv.ms/u/s!Ang3D30bKDOhqPATE80z8n3pUX9JxQ?e=L08oiB