Reputation: 1687
I customize a cursor in the EditText. Input something and find that if the cursor at the end of the EditText, it looks thin. I don't know why.
Here's my code.
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<size android:width="@dimen/2dip" />
<solid android:color="@color/edit_cursor" />
<padding android:top="@dimen/dimen_1_dip" android:bottom="@dimen/dimen_1_dip" />
</shape>
Any ideas?
Upvotes: 1
Views: 297
Reputation: 96
<EditText
android:id="@+id/email"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:hint="Email"
android:singleLine="true"
android:textCursorDrawable="@drawable/color_cursor"
android:textColorHint="#FFFFFF"
android:textColor="#ffffff"
android:inputType="textEmailAddress"
android:ems="10" >
</EditText>
color_cursor.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" >
<size android:width="1dp" />
<solid android:color="#FFFFFF" />
</shape>
Upvotes: 1