how can i change the EditText cursor knob color android (not the cursor color the knob)

岁酱吖の 提交于 2020-01-03 09:16:14

问题


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"/>

回答1:


To change the cursor selection handle in EditText

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


来源:https://stackoverflow.com/questions/30915729/how-can-i-change-the-edittext-cursor-knob-color-android-not-the-cursor-color-th

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!