[英]How to set image on a imageview in webview in android
尝试在网络视图上更改个人资料图像。 但是当尝试更新的图像时显示崩溃的图像。
webView.loadUrl("javascript: (function() {document.getElementById('SelectedImage').src='"+profilePath+"';}) ();");
如果profilePath
是Uri对象,则需要从该对象获取绝对路径。
使用File f = new File(profilePath.toString());
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.