Android 有一个默认的绿色泪滴出现在文本下方以帮助选择文本或位置。如何在没有 @drawable
的情况下更改它的颜色?我尝试了 android:textSelectHandle="@color/colorPrimary"
但这只是让它消失了。
<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" />
最佳答案
我通过将其添加到我的 styles.xml 来修复它:
<item name="colorControlActivated">@color/colorPrimary</item>
关于这个主题的所有其他接受的答案都涉及 @drawable
,这似乎是最简单的方法。
关于android - 如何更改 EditText 的 textSelectHandle 颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41311044/