I'm using Fresco library for loading images and gifs into my application. The big restriction I have encountered with Fresco is that the layout width and height have to be set. So I have set up my simple drawee view like so:
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/image"
android:layout_marginTop="@dimen/feed_item_margin"
android:scaleType="fitCenter"
fresco:actualImageScaleType="fitStart"
android:layout_below="@+id/content_header"
android:layout_width="match_parent"
android:layout_height="@dimen/texture_view_height"
fresco:placeholderImage="@drawable/placeholder"
/>
My issue is if the image height is greater than the width there is a lot of white space left to the right of the image (see attached), however the height is fine
Then it can happen where the height if the actual image is less than the width (see attached) so here because the fixed height is 250dp there is a lot of white space below the image.
I have been through the different scaleTypes in the SimpleDrawerView and none seem to work to display the way I want to.
I'm wondering does anyone have much experience with Fresco? I've started using this for loading gifs as I had an issue with Glide.
If anyone can help I'd greatly appreciate it.
FYI these images are streamed from a server, I have no control over the images