How to change EditText pointer color (not cursor)

前端 未结 3 616
陌清茗
陌清茗 2021-02-18 21:18

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 l

3条回答
  •  醉话见心
    2021-02-18 22:07

    After some hours of checking other solutions I found this one. If you wish to change a cursor handler only in one activity, you should do so. Change your values/styles.xml, for instance:

    
    

    where @color/cursor is added in values/color.xml. After that apply the style to the activity as written here: Apply a theme to an activity in Android?.

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setTheme(R.style.AppTheme_Cursor);
        ...
    

提交回复
热议问题