I generally don't prefer loading images directly from the Fragment/Activity, 
because I typically use the images multiple places throughout the app and don't 
want the user to pay for the same data twice.

General solution: setup a Singleton image cache like described in the docs,  
along with an HttpURLConnection that will load requested images if they are not 
already cached. I've used an AsyncTask to make the request within the image 
cache code.  When a 'waited' image completes, send out a LocalBroadcast so that 
any interested Activities/Fragments can be notified and can react.  If a second 
request comes in for the same image, I don't create a new AsyncTask.

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to