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 appearing?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
As MarvinLabs pointed out, it's a set of drawables in the Android SDK. They can be overridden though.
Find these images in your sdk platform:
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.
If you don't have a custom theme yet defined in your styles.xml, define one. Then add these items to it:
_
BEFORE:
AFTER:
(different EditTexts but you get the idea)
I'm pretty sure this is only happening on that specific API or device. It might work differently on other apps too. Ultimately I don't see any real way to disable something that is native to the device. Also, the devices out there is very vast so you'd have a very hard time disabling that even if you find a way.
This pointer is a system helper to allow the user to move the cursor easily (more precisely than just by touching the EditText). So I don't know if you can remove it, but I am sure it is not a good idea anyway.
Additionally, this is the kind of pointer that will get styled differently according to the devices. If you look at the SDK's android source, you will find some drawables called text_select_handle_XXX.png I guess you will find from that how to change the system style in your own theme.
You can do this programmatically with a custom
EditText
. You need to create a customMovementMethod
implementation, one such thatcanSelectArbitrarily()
returns false. Then you simply overrideEditText.getDefaultMovementMethod()
to return yourCustomMovementMethod
: