YogaLayout inside VirtualYogaLayout has not size #1244

Closed
opened 2023-04-11 02:01:50 -07:00 by TChengZ · 1 comment
TChengZ commented 2023-04-11 02:01:50 -07:00 (Migrated from github.com)

Report

Issues and Steps to Reproduce

Replaces this with steps to repro your issue.
`

<?xml version="1.0" encoding="utf-8"?>

<com.facebook.yoga.android.YogaLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:yoga="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
yoga:yg_width="100%"
yoga:yg_height="100%"
yoga:yg_alignItems="center"
android:id="@+id/fl_child_frg"
>
<com.facebook.yoga.android.VirtualYogaLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/flv_child_frg"
yoga:yg_flexDirection="column"
>

<com.facebook.yoga.android.YogaLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/fl_child_tmp"
>

</com.facebook.yoga.android.YogaLayout>
</com.facebook.yoga.android.VirtualYogaLayout>
</com.facebook.yoga.android.YogaLayout>
`
i have xml like above, a VirtualYogaLayout with a textView and a yogalayout(which has a textview in it),but as i run it, we can only see one textview
image
it seems any yogaLayout inculding its children has not size when used in VirtualYogaLayout.
image
image

Expected Behavior

Describe what you expected would happen.

Actual Behavior

Describe what actually happened.

Link to Code

If you have some code that maintainers can clone/test for themselves, bugs can be resolved much faster. Please paste a link here.

When applicable, use this fiddle to post a web repro.

# Report - [ ] I have searched [existing issues](https://github.com/facebook/yoga/issues) and this is not a duplicate # Issues and Steps to Reproduce ***Replaces this with steps to repro your issue.*** ` <?xml version="1.0" encoding="utf-8"?> <com.facebook.yoga.android.YogaLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:yoga="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" yoga:yg_width="100%" yoga:yg_height="100%" yoga:yg_alignItems="center" android:id="@+id/fl_child_frg" > <com.facebook.yoga.android.VirtualYogaLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/flv_child_frg" yoga:yg_flexDirection="column" > <TextView android:id="@+id/stv_btn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Text in VirtualYogaLayout" style="@style/style_font_auto_font_body_sample1" android:textColor="@color/yellow" /> <com.facebook.yoga.android.YogaLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/fl_child_tmp" > <TextView android:id="@+id/stv_btn1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Text in YogaLayout" style="@style/style_font_auto_font_body_sample1" android:textColor="@color/yellow" yoga:yg_marginTop="@dimen/auto_dimen2_50" /> </com.facebook.yoga.android.YogaLayout> </com.facebook.yoga.android.VirtualYogaLayout> </com.facebook.yoga.android.YogaLayout> ` i have xml like above, a VirtualYogaLayout with a textView and a yogalayout(which has a textview in it),but as i run it, we can only see one textview ![image](https://user-images.githubusercontent.com/2180654/231110181-85974faa-40d4-4240-b2df-ab1f7ff0b82f.png) it seems any yogaLayout inculding its children has not size when used in VirtualYogaLayout. ![image](https://user-images.githubusercontent.com/2180654/231110598-2b96073c-9154-4882-a403-c476697721d2.png) ![image](https://user-images.githubusercontent.com/2180654/231110664-5f663fb2-0e00-4d74-9f3a-50a858a13612.png) # Expected Behavior ***Describe what you expected would happen.*** # Actual Behavior ***Describe what actually happened.*** # Link to Code ***If you have some code that maintainers can clone/test for themselves, bugs can be resolved much faster. Please paste a link here.*** ***When applicable, use this [fiddle](https://jsfiddle.net/emilsjolander/jckmwztt/) to post a web repro.***
NickGerleman commented 2023-04-25 20:44:56 -07:00 (Migrated from github.com)

We're deprecating the com.facebook.yoga.android.YogaLayout ViewGroup in the next major release of Yoga. We intend to still push out a new version aligned to the core Yoga 2.0. I have bulk closed ViewGroup issues to reflect that we are not planning to invest time into functional changes of the ViewGroup. and eventually intend to remove it from the repo.

We're deprecating the `com.facebook.yoga.android.YogaLayout` ViewGroup in the next major release of Yoga. We intend to still push out a new version aligned to the core Yoga 2.0. I have bulk closed ViewGroup issues to reflect that we are not planning to invest time into functional changes of the ViewGroup. and eventually intend to remove it from the repo.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DaddyFrosty/yoga#1244
No description provided.