We don't support async image decoding yet (ala push model).

On Tue, Jan 6, 2009 at 11:50 PM, [email protected]
<[email protected]> wrote:
>
> Hi
>
> I am using the following code to display an image from the internet
>
>  ImageView i = new ImageView(mContext);
>  i.setImageDrawable(getDrawable("http://www.google.com/images/
> nav_logo3.png"));
> ...
>
>        public Drawable getDrawable(String imgUrl) {
>                try {
>                        URL url = new URL(imgUrl);
>                        InputStream is = (InputStream) url.getContent();
>                        Drawable d = Drawable.createFromStream(is, "src");
>                        return d;
>                } catch (MalformedURLException e) {
>                        e.printStackTrace();
>                        return null;
>                } catch (IOException e) {
>                        e.printStackTrace();
>                        return null;
>                }
>        }
>
> but I would like to be able to load the image asynchronously so that
> if I want to display a list of 10 images then the text would start to
> render and then images would load one after the other (like a
> browser...) . The problem with every code that I have seen so far is
> that it is all synchronous that is not really good for user
> experience. I am sure I am missing somthing and would really
> appreciate your help
>
> thanks
>
> jb
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to