Square image in Horizontal Listview
See original GitHub issueI am attempting to create a XML code for a SimpleDraweeView to display a square image in different RecyclerViews.
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/card_item_image"
android:layout_width="match_parent"
android:layout_height="wrap_content"
fresco:actualImageScaleType="centerCrop"
fresco:viewAspectRatio="1"/>
I can achieve square images in any type of vertical list. My issue is that if I attempt to use this layout for any horizontal lists, the SimpleDraweeView is not present.
(The image below shows 3 lists. The first is a horizontal list, while the two lists below are vertical.)
I understand that Fresco has issues when it comes to not setting width and/or height. If I set the Width to wrap, nothing is show, so viewAspectRatio only works when it has a width.
Is there a workaround for this and can this be altered to accommodate square image based on available height instead of width?
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Emulating horizontal list of images as seen in google play app
1) 3 perfectly squared images are fully seen and another one is partially shown. The second one (the greenish one) is right in...
Read more >Flutter Horizontal ListView With Image-Build A Material App
My Facebook group.join to this group if you want free coupon of my udemy course: https://www.facebook.com/groups/2057947887830643/Please ...
Read more >Item containers and templates - Windows apps - Microsoft Learn
ListView and GridView controls manage how their items are arranged (horizontal, vertical, wrapping, etc…) and how a user interacts with the ...
Read more >29. Building Grid Layout Using LazyVGrid and LazyHGrid
In this chapter, I will walk you through how to create both horizontal and vertical views. Both LazyVGrid and LazyHGrid are designed to...
Read more >How To Use Images In Flutter — To The Point | by Pinkesh Darji
There is hardly any app that doesn't use the images at all ... empty space (Green colored part of the container) horizontally in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Guys it’s so annoying. Please consider to fix this bug
UP