SeriesGuide
SeriesGuide copied to clipboard
Show error drawable for movie posters
When a movie poster can not be loaded (network failure or metered connection), display an error drawable like for show posters.
In MoviesAdapter
and MoviesCursorAdapter
use code like
ServiceUtils.loadWithPicasso(getContext(), item.poster)
.centerCrop()
.resizeDimen(R.dimen.movie_item_width, R.dimen.movie_item_poster_height)
.error(R.drawable.ic_image_missing)
.into(holder.poster);
This simple approach, however, is broken. The grid items are dynamically increased in width based on the available width of the GridView
so R.dimen.movie_item_width
is not always accurate.
Issues
- Figure out how to dynamically determine the actual width of a movie item.