<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#ffffff" />
<stroke android:width="1dp"
android:color="#000000" />
</shape>
I am using this code in setBackgroundResource(R.drawable.selfbg);
While I am using this code the cursor is not visible in Edittext.
Did you try?
Setting the android:textCursorDrawable
attribute to @null should result in the use of android:textColor
as the cursor color.
try to add below into EditText:
android:textCursorDrawable="@null"
android:background="@null"
try:
<item name="android:textCursorDrawable">@null</item>
It requires API-12 and above though.
<EditText
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textCursorDrawable="@drawable/color_cursor"
android:background="@drawable/R.drawable.selfbg"/>
Than create drawalble xml: color_cursor
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<size android:width="2dp" />
<solid android:color="#000000" />
</shape>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With