rockolz.blogg.se

Change edittext cursor color
Change edittext cursor color












change edittext cursor color

So if anybody knows how to do this, I need your help. I google a bit, but all the links that appear only talk about how to change the cursor, not the pointer. I'm able to make the underline and the cursor to become blue, but the droplet looking pointer is still grey. Unfortunately this is not accessible for effects. I'm trying to make the pointer color of EditText to become blue. There I was able to call, which accesses the native control. HandleDrawable.SetColorFilter((), ) įield = (drawableName) Int32 handle = field.GetInt(Control.EditText) ĭrawable handleDrawable = Resources.GetDrawable(handle, null) 25 I'm trying to make the pointer color of EditText to become blue. įor (Int32 index = 0 index < fieldsNames.Length & index < drawablesNames.Length index++)įield = (fieldName) I ended up with a custom renderer for the entry. JNIEnv.SetField(Control.Handle, mCursorDrawableResProperty, _cursor) īut with that the app crashes with the following error in the output: JNI DETECTED ERROR IN APPLICATION: jfieldID int not valid for an object of class md5a6256f8d5bc17d3565a450e514d4a6e7.MaterialFormsTextInputLayout IntPtr mCursorDrawableResProperty = JNIEnv.GetFieldID(IntPtrtextViewClass, "mCursorDrawableRes", "I")

change edittext cursor color

IntPtr IntPtrtextViewClass = JNIEnv.FindClass(typeof(TextView)) Is there a way that I can override the color set as the cursor color?īased on this Forum discussion I tried this Effect: protected override void OnAttached() But on Android it stays black which makes it barely visible. On IOS the cursor color changes with the font color to white. That seems to override the cursor color to black. I have a Xamarin Forms Android application with the Material Design Visual.














Change edittext cursor color