Load image from URL

空扰寡人 提交于 2019-12-07 00:49:29

Your best bet is using a WebView, but if you really want to do it this way don't use setImageDrawable. You should use setImageBitmap. If your LoadImageFromWebOperations returns a Bitmap then you shouldn't change anything, but the function you are using and it should work smoothly.

Your code work, my dear friend your url don't work http://mysite.com/mv/vfdemo1/slides/slide1.jpg.

You can use this it works 100%, but your code also works

URL url = new URL("http://variable3.com/files/images/email-sig.jpg");
Bitmap bmp = BitmapFactory.decodeStream(url.openConnection().getInputStream());
slideHolder.setImageBitmap(bmp);
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!