How to hide Bubble cursor on EditText?

If you have an EditText , clicking on it will display the Bubble Cursor. I am showing the snapshot below (using the Twitter app as an example) ...

My question is:

  • What is it really called (I think this is not a Bubble Cursor specifically)?
  • How to disable it from our EditText ? (or from all of our Activity / Fragment / App)

enter image description here

+5
source share
1 answer

It is called a text selection descriptor.

There is a tricky way to hide this: replace transparent with 0px in your .xml style.

range hood / zero_px_transparent.xml

  <?xml version="1.0" encoding="UTF-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <size android:height="0dp" android:width="0dp"/> </shape> 

And change your .xml style:

 <style name="CustomTheme" parent="@android:style/Theme.Holo.Light"> <item name="android:textSelectHandleLeft">@drawable/zero_px_transparent</item> <item name="android:textSelectHandleRight">@drawable/zero_px_transparent</item> <item name="android:textSelectHandle">@drawable/zero_px_transparent</item> </style> 
+6
source

All Articles