1

I'm trying to hide textSelectHandleLeft and textSelectHandleRight on WebView when user select the text, I want the text to be selected but want to hide these grey bubble type handles.

currently I'm using setTheme() and changing to height of textSelectHandleLeft and textSelectHandleRight by the following code but don't work instantly as it works on second time:

style.xml

<style name="CustomThemeForTextSelection" parent="@android:style/Theme.Holo.Light">
        <item name="android:textSelectHandleLeft">@drawable/empty_handle</item>
        <item name="android:textSelectHandleRight">@drawable/empty_handle</item>
        <item name="android:textSelectHandle">@drawable/empty_handle</item>
    </style>

empty_handle.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>

SCREENSHOT

Dinesh Shingadiya
  • 988
  • 1
  • 8
  • 23
josh
  • 79
  • 12

0 Answers0