Any reason, we measure child to size 0
See original GitHub issueHi
I am currently reading the zoom layout code
in onMeasure of ZoomLayout
// Measure ourselves as MATCH_PARENT
val widthMode = View.MeasureSpec.getMode(widthMeasureSpec)
val heightMode = View.MeasureSpec.getMode(heightMeasureSpec)
if (widthMode == View.MeasureSpec.UNSPECIFIED || heightMode == View.MeasureSpec.UNSPECIFIED) {
throw RuntimeException("$TAG must be used with fixed dimensions (e.g. match_parent)")
}
val widthSize = View.MeasureSpec.getSize(widthMeasureSpec)
val heightSize = View.MeasureSpec.getSize(heightMeasureSpec)
setMeasuredDimension(widthSize, heightSize)
// Measure our child as unspecified.
val spec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED)
measureChildren(spec, spec)
May I ask why do we measure child to 0 size
Thanks #
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Body Image: Move Over Size 0, Some Women Brag About ...
Body Image: Move Over Size 0, Some Women Brag About Fitting Into Kids Clothes · Caption Options · Glamour Daily.
Read more >When a Size 0 Isn't Really 0: The Psychology Behind Top ...
1 rule of shopping. The fact is, 15 years ago, size zero and 2 did not exist in American clothes. “They are really...
Read more >When a Child is Unusually Short - HealthyChildren.org
Short stature refers to any child who has a height well below what is typical for that child's age and sex. The term...
Read more >Baby clothing sizes, explained: What you need to know to ...
Newborn or 0-3 months? Experts help break down the confusing world of baby sizes and how they relate to clothes.
Read more >The Trouble With Growth Charts - The New York Times
Those lines you see on the growth chart don't represent a single child's growth — they're an amalgam of measurements of millions of...
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
Thanks @natario1 .
For having ZL in RecyclerView, I create a branch on my git repo.
https://github.com/xiaogegexiao/ZoomLayout/tree/experimental/xiao/zoomlayout-in-recyclerview.
You can take a look when you have time
@markusressel Yeah, thanks, I think it works. Just wonder whether it will support ZL in recyclerview. I will close this issue.