Search code examples
androidcolorstextbox

EditText color cursor and marker


I need to change all color of edittext from pink to blue, but the marker is always pink:

enter image description here

I'm use this code xml:

android:textCursorDrawable="@drawable/textcursor"

and

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle" >
    <size
        android:width="2dip" />
    <solid
        android:color="@color/colorPrimaryDark" />
</shape>

Solution

  • you need change colorControlActivated in style

    res/value/styles.xml

    <style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
        <item name="colorControlActivated">@color/color_Black</item>
    </style>
    

    and use this in manifest