Open GoogleCodeExporter opened 9 years ago
Hello,
Thanks for the feature request! Could you explain why you can't simply
regenerate the view using the Card builder class once the image is available?
It might be easier than having to look through the different views and layouts
provided by the Card class.
Best,
Alain
Original comment by ala...@google.com
on 13 Dec 2013 at 4:34
Hi Alain
I have a CardScrollView containing cards that I'm trying to load remote images
into (similar to the Stack Overflow question).
It appears that currently I can't use Volley's NetworkImageView which means
that I also need to manage my own cache. I've tried using ImageRequest but
haven't been able to figure out how to refresh cards once the request completes.
If you could elaborate on how to "regenerate the view using the Card builder
class" I'll look into that.
Original comment by paulyoun...@gmail.com
on 13 Dec 2013 at 6:38
Simply create a new Card instance, set the various data you need and call
Card.toView() again to get a newly generated View that you can use in your
layout.
Original comment by ala...@google.com
on 13 Dec 2013 at 6:53
So I think you're saying that I should replace the relevant item in my
List<Card> and everything should just work?
Original comment by paulyoun...@gmail.com
on 13 Dec 2013 at 6:57
If we're not going to allow an easy way to do network loading via the Card
class, it would be good to have a sample project with a card layout or a put a
good example card layout that we can modify so we can do interesting things (as
well as do view recycling), while still sticking to the glass UI as much as
possible.
Original comment by mike...@mikeyin.org
on 18 Dec 2013 at 10:25
This is an issue for me too. To effectively manage the process of downloading
and replacing a number of photos in cards, I figure you need to write lots of
custom code:
- Observer code (like the Camera sample) & callbacks to make sure the image is
on the filesystem
- File caching logic to manage images that have already been downloaded
- Object tracking & view recycling logic as images come in asynchronously over
the wire
- AsyncTask+ThreadPoolExecutor, or IntentService+ResultReceiver for download
management without affecting the UI thread, performance spikes & triggering
garbage collection.
Code samples/sample project would be greatly appreciated!
Original comment by jldavid....@gmail.com
on 5 Jan 2014 at 10:26
Original comment by ala...@google.com
on 6 Jan 2014 at 5:31
This is vey much needed indeed!
Original comment by milosbos...@gmail.com
on 23 Jan 2014 at 4:01
Original issue reported on code.google.com by
paulyoun...@gmail.com
on 13 Dec 2013 at 8:16