I have many images on some of my activities, and all of them are connected to remote servers. The problem every time I go to one of these activities in which images break away from the remote. All images should be loaded first or else you will get a black blank screen. Sometimes it takes around 1-5 minutes to load, and sometimes even closes the device, can I fix this issue anyway?
Here's the code I'm using:
ImageViewimgView = (ImageView) findViewById (R.id.image01); Drawable drawable = LoadImageFromWebOperations ("http://forum.roda.hr/images/customavatars/avatar10164_2.gif"); ImgView.setBackgroundDrawable (drawable); Private Dry Load Load ImageWebWeb Operation (string URL) {try} {InputStream = (InputStream) is the new URL (.org) .getContent; Drawable d = Drawable.createFromStream (is, "src name"); Return D; } Hold (exception e) {System.out.println ("exc =" + e); Return tap; }} I am trying to understand it, please help me, really matters a lot for me thanks in advance!
it should help ..
and As Jeting tries to do it in lazy with Ashynatsky to load in the background ..
Comments
Post a Comment