Currently there is an application that uses Editext in android extensively, because its features will help you to fulfill the requirements of the user, when you use editText in android you must use the EditText cursor color in event. Android in the simplest way.
I will perform a Change Edit Text cursor color in Android event like this:
Create a file xml in layout.xml
I will perform a Change Edit Text cursor color in Android event like this:
Create a file xml in layout.xml
<LinearLayoutHere is the result of change edittext cursor color android :
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/rl"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:orientation="vertical"
tools:context=".MainActivity"
android:background="@color/grey"
>
<EditText
android:id="@+id/et_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="input you name"
android:padding="20dp"
android:textColor="@color/black"
android:textCursorDrawable="@null"
/>
<EditText
android:id="@+id/et_age"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Input your age"
android:padding="20dp"
android:textCursorDrawable="@color/red"
android:textColor="@color/black"
/>
</LinearLayout>
No comments:
Post a Comment