【发布时间】:2019-09-25 01:40:08
【问题描述】:
【问题讨论】:
标签: android layout webview textselection
【问题讨论】:
标签: android layout webview textselection
// 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);
}
});
【讨论】:
试试这个
mWebView.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
return true;
}
});
mWebView.setLongClickable(false);
【讨论】: