I'm specifically looking at doing this in a CardScrollAdapter, but it would be also good to know in the LiveCard situation when publishing a card to the timeline. Is there a way to use volley or any other networking library to load images using the generic Card class?
While you can't use Volley's NetworkImageView class directly with a Card (because the Card manages its own layout), you should be able to use other features in Volley to handle delay-loading your images.
At a high-level, you could use an approach like this:
Card, have it initially use a placeholder image if the desired image isn't already available (cached somewhere). Keep track of the instance of the Card somewhere (in the adapter, for example).file: URL.Card.toView() again to regenerate the card's views and update your UI as needed.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With