如何从webview:android隐藏文本选择句柄

如何从webview:android隐藏文本选择句柄,android,layout,webview,textselection,Android,Layout,Webview,Textselection,我有一个用户可以选择文本的自定义Web视图,我想在用户单击底部某个按钮时隐藏“文本选择句柄”,我想选择文本,但想隐藏句柄,如下所示:试试这个 mWebView.setOnLongClickListener(new OnLongClickListener() { @Override public boolean onLongClick(View v) { return true; } }); mWebView.setLongClickable(false); })

我有一个用户可以选择文本的自定义Web视图,我想在用户单击底部某个按钮时隐藏“文本选择句柄”,我想选择文本,但想隐藏句柄,如下所示:

试试这个

mWebView.setOnLongClickListener(new OnLongClickListener() {
@Override
    public boolean onLongClick(View v) {
        return true;
    }
});
mWebView.setLongClickable(false);

}))

但是这不允许我选择文本。你可以参考这个问题吗:这是我面临的问题:
// call hideTextSelection() from your onCreate()
 function hideTextSelection(){    
 //SOLUTION 1->   vibration caused by the long click not works here
   webView.setHapticFeedbackEnabled(false);   

   //Solution 2: 
   /*webView.setOnLongClickListener(new OnLongClickListener() {
     @Override
     public boolean onLongClick(View v) {
       return true;
     }
   });
   webView.setLongClickable(false);*/
}


// whenever you wants to select the data ie. after onClicking the button 'from the bottom of your UI', make it to select as below
yourBottomButton.setOnClickListener(new OnClickListener() {
 @Override
 public boolean onClick(View v) {
  webView.setHapticFeedbackEnabled(true);
 }