Closed thequbit closed 9 years ago
So one possible solution here is to make a background service that downloads all of the images and makes them available to the fragment. This would result in the images being re-drawn, however hey would not be re-download.
If @reustonium can figure out a solution, I suspect his is the solution that I'll implement for v0.1.2.
The twitter app has, obviously, solved this solution... So it definitely is doable.
Additionally, I think I'll need to create yet another image size on the server for the preview image. The
Good news: I got it working.
Bad news: i hate Android now, ha.
the whole convertView reuse thing really threw me for a loop. Got it working though, and added a hashmap so images aren't downloaded more than once.
Closing.
https://github.com/thequbit/yellr-android/blob/dev/app/src/main/java/yellr/net/yellr_android/fragments/LocalPostsFragment.java#L229
Every time you scroll, the images re-draw themselves. I believe this can be fixed quickly, however i can not figure out why.
We have a ArrayAdapter just like in the assignments feed, however here the items being displayed is bigger.. The ImageView is here:
https://github.com/thequbit/yellr-android/blob/dev/app/src/main/res/layout/fragment_local_post_row.xml#L116
@reustonium if you have any insight that would be awesome.