Hi. I'm about to release my first app and one issue remains. The app has a 
big recyclerview containing a dynamic amount of images (roughly ~600). I 
use Picasso to load images into the items (they are imageviews inside 
cardviews) and the images are loaded from my .NET API. I query the .NET API 
for the images, which returns a JSON list of those 600 images with their 
ID, URL, width and height. The width and height are important because I 
want to pre-set the height of the imageview so that during the scrolling, 
it won't constantly jump up and down because an image just finished loading.
To achieve this, I wrote the following piece of code:
http://pastebin.com/JdXv8sGK
This basically checks if the width of the image is bigger than the width of 
the cardview it is in. If it is, then it checks how much percent the width 
is reduced and takes the same percentage off of the height.
The issue is that sometimes images are getting resized incorrectly, with 
with values. And it's at random too because often a refresh solves it. It 
happens on all kind of devices (got 7 devices to test on, so it's not a 
brand issue).
Does anyone have a clue?
Thanks for reading!

-- 
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.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/77346ad4-0f03-4d02-a669-c7e5d8ac4504%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to