如何更改 EditText 指针颜色(不是光标) [英] How to change EditText pointer color (not cursor)

查看:28
本文介绍了如何更改 EditText 指针颜色(不是光标)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使 EditText 的指针颜色变为蓝色.

I'm trying to make the pointer color of EditText to become blue.

我可以使下划线和光标变为蓝色,但水滴状指针仍然是灰色的.

I'm able to make the underline and the cursor to become blue, but the droplet looking pointer is still grey.

我google了一下,但所有出现的链接都只讨论如何更改光标,而不是指针.所以如果有人知道怎么做,我需要你的帮助.

I google a bit, but all the links that appear only talk about how to change the cursor, not the pointer. So if anybody knows how to do this, I need your help.

我只需要支持Android 5.0及以上.因此,如果您的解决方案仅适用于 API > 21,那完全没问题.

I only need to support Android 5.0 and above. So if your solution only works on API > 21, that's totally fine.

谢谢!

推荐答案

在你的styles.xml中这样写:

in your styles.xml put like this:

<item name="colorAccent">@color/blue</item>

这篇关于如何更改 EditText 指针颜色(不是光标)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆