【发布时间】:2018-04-15 20:37:37
【问题描述】:
我想从 web 或 url 地址加载图片,例如:` "https://images.detik.com/community/media/visual/2017/11/03/5e88c080-0570-47ca-8ea9-96209df2071d_169.jpeg?w=620"
但它也无法打开或加载。
什么代码让它工作,请帮忙谢谢。
这是我的代码
WebView wv = (WebView) findViewById(R.id.webView1);
wv.getSettings().setBuiltInZoomControls(true);
wv.getSettings().setJavaScriptEnabled(true);
img= (ImageView) findViewById(R.id.mainbackdrop);
//BIND
nameTxt.setText(name);
propTxt.setText(propellant);
wv.loadData(desc, "text/html","UTF-8");
PicassoClient.downloadImage(this,imageurl,img);
【问题讨论】:
-
显示你的代码。
-
@RatilalChopda 我认为此评论与帖子无关
-
再次@RatilalChopda,我认为此评论与帖子无关
-
我已经更新了我的问题..
-
你到底想要什么?你搞乱了一个 webview 和一个 imageview。为什么?相当混乱。正如你现在拥有的那样,jpg 与 webview 无关。您的图片表明html页面包含无法找到的图片。为什么要发布一个如此令人困惑的问题?
标签: java android html json webview