If you have created a custom Android EditText class and you see that the color of the Cursor appears to be white you can change it using textCursorDrawable attribute.
You need to set android:textCursorDrawable value as @null, this will set the cursor color as that of the Text.
Do note that android:textCursorDrawable requires minimum SDKI level to be 12 or above.
Example <EditText
android:id="@+id/view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="top|left"
android:lineSpacingExtra="7dp"
android:textCursorDrawable="@null"
android:textSize="20sp"
android:textColor="#010101"
android:text="Hello"
android:background="@drawable/border"
android:scrollbars="vertical">
</EditText>

Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!