In my android app, I have implemented imageview using Fresco, because the images were GIFs. and the images were given from the server made with node.js
There are instagram-like timeline but the images are GIFs. and the problem is that before downloading the photo, the imageviews are set to default size like 200x200. and then after the image is downloaded, it becomes the actual size. I want the imageview to be in the size of the actual size, even before it is loaded. I have seen that most of the commercial apps, the size of the imageview is already set to the original size, even before it is loaded.
I want to know what is the best way to implement this.
I was thinking that when the server is sending the client the descriptions of the post, like image url, title, content, number of likes, should it send the dimensions as well? like
{elements:[{
url:"http://blah.com/image.jpg",
title:"this is the title",
photo_width:300,
photo_height:500,
and other stuffs
},
{another element},
{so on}]
}
or is does the Fresco have a way of solving this that i did not know?