Android, how do I stop a pointer appearing below an EditText

前端 未结 4 809
無奈伤痛
無奈伤痛 2020-12-04 02:09

I have an activity with some EditTexts in it. When I click on an EditText to change the text in it a blue arrow appears below where the cursor appears. How can I stop this a

4条回答
  •  没有蜡笔的小新
    2020-12-04 02:35

    As MarvinLabs pointed out, it's a set of drawables in the Android SDK. They can be overridden though.

    1. Find these images in your sdk platform:

      • text_select_handle_left.png
      • text_select_handle_middle.png
      • text_select_handle_right.png
    2. Copy them over to your drawables folder, so you have a local copy to reference. You can change the colors of these, make them empty, or whatever you want. Note that this as MarvinLabs said, it might not be wise to remove them completely because they help the user select text for cutting and copying.

    3. If you don't have a custom theme yet defined in your styles.xml, define one. Then add these items to it:

    _

    
    

    BEFORE:

    before

    AFTER:

    after

    (different EditTexts but you get the idea)

提交回复
热议问题