本文整理汇总了Java中com.tencent.smtt.export.external.interfaces.JsResult类的典型用法代码示例。如果您正苦于以下问题:Java JsResult类的具体用法?Java JsResult怎么用?Java JsResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JsResult类属于com.tencent.smtt.export.external.interfaces包,在下文中一共展示了JsResult类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onJsAlert
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
@Override
public boolean onJsAlert(WebView view, String url, String message, final JsResult result) {
if (!((EBrowserActivity) view.getContext()).isVisable()) {
result.confirm();
}
AlertDialog.Builder dia = new AlertDialog.Builder(view.getContext());
dia.setTitle(EUExUtil.getResStringID("prompt"));
dia.setMessage(message);
dia.setCancelable(false);
dia.setPositiveButton(EUExUtil.getResStringID("confirm"), new OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
result.confirm();
}
});
dia.create();
dia.show();
return true;
}
开发者ID:AppCanOpenSource,项目名称:appcan-android,代码行数:19,代码来源:CBrowserMainFrame.java
示例2: onJsAlert
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
@Override
public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
if (AgentWebX5Utils.isOverriedMethod(mWebChromeClient, "onJsAlert", "public boolean " + ChromePath + ".onJsAlert", WebView.class, String.class, String.class, JsResult.class)) {
return super.onJsAlert(view, url, message, result);
}
Activity mActivity = this.mActivityWeakReference.get();
if (mActivity == null||mActivity.isFinishing()) {
result.cancel();
return true;
}
//
try {
AgentWebX5Utils.show(view,
message,
Snackbar.LENGTH_SHORT,
Color.WHITE,
mActivity.getResources().getColor(R.color.black),
null,
-1,
null);
} catch (Throwable throwable) {
throwable.printStackTrace();
if(LogUtils.isDebug())
LogUtils.i(TAG,throwable.getMessage());
}
result.confirm();
return true;
}
开发者ID:Justson,项目名称:AgentWebX5,代码行数:35,代码来源:DefaultChromeClient.java
示例3: onJsConfirm
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
@Override
public boolean onJsConfirm(WebView view, String url, String message, JsResult result) {
LogUtils.i(TAG, message);
if (AgentWebX5Utils.isOverriedMethod(mWebChromeClient, "onJsConfirm", "public boolean " + ChromePath + ".onJsConfirm", WebView.class, String.class, String.class, JsResult.class)) {
return super.onJsConfirm(view, url, message, result);
}
showJsConfirm(message, result);
return true; //
}
开发者ID:Justson,项目名称:AgentWebX5,代码行数:12,代码来源:DefaultChromeClient.java
示例4: onJsAlert
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
/**
* Tell the client to display a javascript alert dialog.
*/
@Override
public boolean onJsAlert(WebView view, String url, String message, final JsResult result) {
dialogsHelper.showAlert(message, new CordovaDialogsHelper.Result() {
@Override public void gotResult(boolean success, String value) {
if (success) {
result.confirm();
} else {
result.cancel();
}
}
});
return true;
}
开发者ID:runner525,项目名称:x5webview-cordova-plugin,代码行数:17,代码来源:X5WebChromeClient.java
示例5: onJsConfirm
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
/**
* Tell the client to display a confirm dialog to the user.
*/
@Override
public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) {
dialogsHelper.showConfirm(message, new CordovaDialogsHelper.Result() {
@Override
public void gotResult(boolean success, String value) {
if (success) {
result.confirm();
} else {
result.cancel();
}
}
});
return true;
}
开发者ID:runner525,项目名称:x5webview-cordova-plugin,代码行数:18,代码来源:X5WebChromeClient.java
示例6: onJsAlert
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
/**
* Tell the client to display a javascript alert dialog.
*/
public boolean onJsAlert(WebView view, String url, String message, final JsResult result) {
dialogsHelper.showAlert(message, new CordovaDialogsHelper.Result() {
@Override public void gotResult(boolean success, String value) {
if (success) {
result.confirm();
} else {
result.cancel();
}
}
});
return true;
}
开发者ID:jeremyup,项目名称:cordova-plugin-x5-webview,代码行数:16,代码来源:X5WebChromeClient.java
示例7: onJsConfirm
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
/**
* Tell the client to display a confirm dialog to the user.
*/
public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) {
dialogsHelper.showConfirm(message, new CordovaDialogsHelper.Result() {
@Override
public void gotResult(boolean success, String value) {
if (success) {
result.confirm();
} else {
result.cancel();
}
}
});
return true;
}
开发者ID:jeremyup,项目名称:cordova-plugin-x5-webview,代码行数:17,代码来源:X5WebChromeClient.java
示例8: onJsAlert
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
/**
* Tell the client to display a javascript alert dialog.
*/
@Override
public boolean onJsAlert(WebView view, String url, String message, final JsResult result) {
dialogsHelper.showAlert(message, new CordovaDialogsHelper.Result() {
@Override
public void gotResult(boolean success, String value) {
if (success) {
result.confirm();
} else {
result.cancel();
}
}
});
return true;
}
开发者ID:zsxsoft,项目名称:cordova-plugin-x5-tbs,代码行数:18,代码来源:X5WebChromeClient.java
示例9: onJsConfirm
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
/**
* Tell the client to display a confirm dialog to the user.
*/
@Override
public boolean onJsConfirm(WebView view, String url, String message, final JsResult result) {
dialogsHelper.showConfirm(message, new CordovaDialogsHelper.Result() {
@Override
public void gotResult(boolean success, String value) {
if (success) {
result.confirm();
} else {
result.cancel();
}
}
});
return true;
}
开发者ID:zsxsoft,项目名称:cordova-plugin-x5-tbs,代码行数:18,代码来源:X5WebChromeClient.java
示例10: onJsAlert
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
public boolean onJsAlert(WebView view, String url, String message,
JsResult result) {
if (this.mRealWebChromeClient != null)
return this.mRealWebChromeClient.onJsAlert(view, url, message, result);
return super.onJsAlert(view,url,message,result);
}
开发者ID:Justson,项目名称:AgentWebX5,代码行数:7,代码来源:WebChromeClientWrapper.java
示例11: onJsConfirm
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
public boolean onJsConfirm(WebView view, String url, String message,
JsResult result) {
if (this.mRealWebChromeClient != null)
return this.mRealWebChromeClient.onJsConfirm(view, url, message, result);
return super.onJsConfirm(view,url,message,result);
}
开发者ID:Justson,项目名称:AgentWebX5,代码行数:7,代码来源:WebChromeClientWrapper.java
示例12: onJsBeforeUnload
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
public boolean onJsBeforeUnload(WebView view, String url, String message,
JsResult result) {
if (this.mRealWebChromeClient != null)
return this.mRealWebChromeClient.onJsBeforeUnload(view, url, message, result);
return super.onJsBeforeUnload(view,url,message,result);
}
开发者ID:Justson,项目名称:AgentWebX5,代码行数:7,代码来源:WebChromeClientWrapper.java
示例13: toCancelJsresult
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
private void toCancelJsresult(JsResult result) {
if (result != null)
result.cancel();
}
开发者ID:Justson,项目名称:AgentWebX5,代码行数:5,代码来源:DefaultChromeClient.java
示例14: onJsAlert
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
@Override
public boolean onJsAlert(WebView view, String url, String message, JsResult result) {
return false;
}
开发者ID:hjhrq1991,项目名称:JsBridge,代码行数:5,代码来源:WebChromeClientListener.java
示例15: onJsConfirm
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
@Override
public boolean onJsConfirm(WebView view, String url, String message, JsResult result) {
return false;
}
开发者ID:hjhrq1991,项目名称:JsBridge,代码行数:5,代码来源:WebChromeClientListener.java
示例16: onJsBeforeUnload
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
@Override
public boolean onJsBeforeUnload(WebView view, String url, String message, JsResult result) {
return false;
}
开发者ID:hjhrq1991,项目名称:JsBridge,代码行数:5,代码来源:WebChromeClientListener.java
示例17: onJsAlert
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
boolean onJsAlert(WebView view, String url, String message, JsResult result);
开发者ID:hjhrq1991,项目名称:JsBridge,代码行数:2,代码来源:OnWebChromeClientListener.java
示例18: onJsConfirm
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
boolean onJsConfirm(WebView view, String url, String message, JsResult result);
开发者ID:hjhrq1991,项目名称:JsBridge,代码行数:2,代码来源:OnWebChromeClientListener.java
示例19: onJsBeforeUnload
import com.tencent.smtt.export.external.interfaces.JsResult; //导入依赖的package包/类
boolean onJsBeforeUnload(WebView view, String url, String message, JsResult result);
开发者ID:hjhrq1991,项目名称:JsBridge,代码行数:2,代码来源:OnWebChromeClientListener.java
注:本文中的com.tencent.smtt.export.external.interfaces.JsResult类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论