Parent layout height issue with max - height and setUseWebDefaults in Yoga 3.2.0 #1797

Open
opened 2025-03-11 05:50:30 -07:00 by chanchangxing · 2 comments
chanchangxing commented 2025-03-11 05:50:30 -07:00 (Migrated from github.com)

Android Platform

I'm encountering an issue with the layout behavior in the Yoga library (version 3.2.0). Here's the scenario:​

  • The parent layout has a height set to auto.​

  • The child layout has a height of 700px and a max - height set to 500px.​

When running, the observed result is that the parent layout has a height of 700px, while the child layout has a height of 500px as expected. I noticed that setting setUseWebDefaults seems to solve this issue. However, I'm not sure if setting it only on the parent node will cause any problems.​

I also wanted to inquire if setting setUseWebDefaults to true in version 3.2.0 has any performance implications.​
Thank you for your time and assistance.

**Android Platform** I'm encountering an issue with the layout behavior in the Yoga library (version 3.2.0). Here's the scenario:​ - The parent layout has a height set to auto.​ - The child layout has a height of 700px and a max - height set to 500px.​ When running, the observed result is that the parent layout has a height of 700px, while the child layout has a height of 500px as expected. I noticed that setting setUseWebDefaults seems to solve this issue. However, I'm not sure if setting it only on the parent node will cause any problems.​ I also wanted to inquire if setting setUseWebDefaults to true in version 3.2.0 has any performance implications.​ Thank you for your time and assistance.
chanchangxing commented 2025-03-11 05:54:47 -07:00 (Migrated from github.com)

Image

![Image](https://github.com/user-attachments/assets/d057a4c1-579c-4356-8e8e-2cf0360d6c89)
chanchangxing commented 2025-03-11 05:55:32 -07:00 (Migrated from github.com)

Image

![Image](https://github.com/user-attachments/assets/79df46ed-e896-4d15-8bf7-27e15c90f525)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#1797
No description provided.