How to have wrap_content height instead of fixed height?
See original GitHub issueI have used wrap_content
height. But it doesn’t show the image. I want to use the wrap_content height, so that the slider is shown based on image retrieved image size from url.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5
Top Results From Across the Web
Anyway to keep the height of a layout as wrap content, but not ...
Use android:maxHeight to set the maximum height that you want the ScrollView to be. · I have set android:layout_height="wrap_content" and android ...
Read more >ViewGroup.LayoutParams - Android Developers
This set of layout parameters defaults the width and the height of the children to ViewGroup. ... WRAP_CONTENT when they are not specified...
Read more >ConstraintLayout does not measure height correctly when ...
ConstraintLayout does not measure height correctly when using wrap_content and layout_constrainedHeight is set to true. 7. Hotlists (2)
Read more >wrap_content height not working as excpected | Android Forums
Hi Alex, · Thanks for your patience, · We have fixed the reported issue "SfAutoComplete and EditText heights are different when we set...
Read more >How to make a SwiftUI view to fill its container width and height
1 Set .frame(maxWidth: .infinity) to make the text view expand to fill a container width. 2 Set blue border will make an ...
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 Free
Top 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
Using ConstraintLayout as a parent view to control the ratio:
Here is the xml example:
I like your answer @andyleekp, the only thing that can be improved, if needed, is to calculate the aspect ratio dynamically for each image (if images are what drives heights for each page of the slider).