4

Android has a default green tear drop that appears under the text to help select text or position. How can I change the color of it without @drawables? I tried android:textSelectHandle="@color/colorPrimary" but that just made it disappear.

<EditText
  android:inputType="text"
  android:layout_width="fill_parent"
  android:layout_height="match_parent"
  android:layout_toEndOf="@+id/imgMagnifyingGlass"
  android:textAlignment="viewStart"
  android:backgroundTint="@color/colorWhite"
  android:textCursorDrawable="@null"
  android:textSelectHandle="@color/colorPrimary"
  android:textColor="@color/colorGray"
  android:id="@+id/editTextWord" />
twharmon
  • 4,153
  • 5
  • 22
  • 48

1 Answers1

6

I fixed it by adding this to my styles.xml:

<item name="colorControlActivated">@color/colorPrimary</item>

All the other accepted answers on this topic involve @drawables and this seems the simplest way.

twharmon
  • 4,153
  • 5
  • 22
  • 48