如何更改android的EditText光标旋钮颜色(而不是光标的旋钮颜色) [英] how can i change the EditText cursor knob color android (not the cursor color the knob)

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

问题描述

我正在尝试更改EditText光标旋钮,但看不到它在设备上,该布局的附件是我的XML

I am trying to change my EditText cursor knob but failing to see it on a device, attached is my XML for this layout

<EditText
    android:id="@+id/new_text_edit_text"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_centerVertical="true"
    android:imeOptions="flagNoExtractUi"
    android:layout_marginLeft="16dp"
    android:layout_toLeftOf="@+id/new_text_button_send"
    android:background="@android:color/white"
    android:hint="@string/write_a_message"
    android:textSize="@dimen/text_size_large"
    android:gravity="center_vertical"
    android:fontFamily="sans-serif-light"
    android:inputType="text|textMultiLine|textCapSentences|textShortMessage"
    android:textCursorDrawable="@drawable/cursor_glide_blue"
    android:lines="3"
    android:singleLine="false"/>

推荐答案

更改EditText

android:textSelectHandle="@drawable/handle_middle"
android:textSelectHandleLeft="@drawable/handle_left"
android:textSelectHandleRight="@drawable/handle_right"

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

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