Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

not the cursor color the knob colorI 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"/>
like image 658
Shimi Uhlman Avatar asked Jun 18 '15 12:06

Shimi Uhlman


People also ask

How do I change the cursor color in edit text?

Setting the android:textCursorDrawable attribute to @null should result in the use of android:textColor as the cursor color.


1 Answers

To change the cursor selection handle in EditText

android:textSelectHandle="@drawable/handle_middle"
android:textSelectHandleLeft="@drawable/handle_left"
android:textSelectHandleRight="@drawable/handle_right"
like image 71
Chandrakanth Avatar answered Oct 02 '22 22:10

Chandrakanth