android.webkit.WebView.setOnLongClickListener()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(247)

本文整理了Java中android.webkit.WebView.setOnLongClickListener()方法的一些代码示例,展示了WebView.setOnLongClickListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.setOnLongClickListener()方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:setOnLongClickListener

WebView.setOnLongClickListener介绍

暂无

代码示例

代码示例来源:origin: iTXTech/Daedalus

mWebView.addJavascriptInterface(this, "JavascriptInterface");
mWebView.setOnLongClickListener(v -> true);

代码示例来源:origin: stackoverflow.com

public class Seccion1 extends Fragment 
{
 WebView mWebView;

 @Override
 public View onCreateView(LayoutInflater inflater, ViewGroup container,
           Bundle savedInstanceState) {
 View rootView = inflater.inflate(R.layout.seccion3, container, false);
 mWebView = (WebView)rootView.findViewById(R.id.lectura_webView);
 //Archivo de ejemplo. Cambiar por el adecuado.
 --> THIS IS THE LINE THAT GIVES THE ERROR   
 mWebView.loadUrl("file:///android_asset/productividad/ejemplo1.html");

 mWebView.getSettings().setBuiltInZoomControls(true);
 mWebView.getSettings().setDisplayZoomControls(false);

 mWebView.setLongClickable(true);
 mWebView.setOnLongClickListener(new View.OnLongClickListener() {

  @Override
  public boolean onLongClick(View v) {
    return true;
  }
 });
 return rootView;
}
}

代码示例来源:origin: apps4av/avare

mWebView.setOnLongClickListener(new OnLongClickListener() {
  @Override
  public boolean onLongClick(View v) {

代码示例来源:origin: AnyChart/AnyChart-Android

webSettings.setLoadWithOverviewMode(true);
webView.setLongClickable(true);
webView.setOnLongClickListener(new OnLongClickListener() {
  @Override
  public boolean onLongClick(View v) {

代码示例来源:origin: andforce/iBeebo

large.setOnLongClickListener(longClickListener);

代码示例来源:origin: apps4av/avare

mWebView.setOnLongClickListener(new OnLongClickListener() {
  @Override
  public boolean onLongClick(View v) {

代码示例来源:origin: apps4av/avare

mWebView.setOnLongClickListener(new OnLongClickListener() {
  @Override
  public boolean onLongClick(View v) {

代码示例来源:origin: apps4av/avare

mWebView.setOnLongClickListener(new OnLongClickListener() {
  @Override
  public boolean onLongClick(View v) {

代码示例来源:origin: stackoverflow.com

web.setOnLongClickListener(new OnLongClickListener() {
  @Override
  public boolean onLongClick(View v) {

代码示例来源:origin: lv910929/RxDemo

activityWebViewBinding.webView.setWebViewClient(myWebViewClient);
activityWebViewBinding.webView.setWebChromeClient(myWebChromeClient);
activityWebViewBinding.webView.setOnLongClickListener(new View.OnLongClickListener() {
  @Override
  public boolean onLongClick(View v) {

代码示例来源:origin: indywidualny/FaceSlim

webView.setOnLongClickListener(new View.OnLongClickListener() {
  @Override
  public boolean onLongClick(View v) {

代码示例来源:origin: ymback/NGA-CLIENT-VER-OPEN-SOURCE

contentTV.setBackgroundColor(0);
contentTV.setLongClickable(false);
contentTV.setOnLongClickListener(new View.OnLongClickListener() {
  @Override
  public boolean onLongClick(View view) {

代码示例来源:origin: mgks/Android-SmartWebView

webSettings.setDomStorageEnabled(true);
asw_view.setOnLongClickListener(new View.OnLongClickListener() {
  @Override
  public boolean onLongClick(View v) {

代码示例来源:origin: AriesHoo/FastLib

@Override
protected void setAgentWeb(AgentWeb mAgentWeb) {
  super.setAgentWeb(mAgentWeb);
  WebView mWebView = mAgentWeb.getWebCreator().getWebView();
  mWebView.setOnLongClickListener(v -> {
    WebView.HitTestResult hitTestResult = mWebView.getHitTestResult();
    if (hitTestResult == null) {
      return false;
    }
    if (hitTestResult.getType() == WebView.HitTestResult.IMAGE_TYPE
        || hitTestResult.getType() == WebView.HitTestResult.SRC_IMAGE_ANCHOR_TYPE) {
      showDownDialog(hitTestResult.getExtra());
    } else if (!mIsShowTitle) {
      showActionSheet();
    }
    LoggerManager.d("onLongClick:hitTestResult-Type:" + hitTestResult.getType() + ";Extra:" + hitTestResult.getExtra());
    return true;
  });
}

代码示例来源:origin: jruesga/rview

super.setOnLongClickListener(v -> {

代码示例来源:origin: apps4av/avare

wv.setOnLongClickListener(new View.OnLongClickListener() {
  @Override
  public boolean onLongClick(View v) {

相关文章

WebView类方法