Programmatically added views are not visible due to YogaLayout on Android #614
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Report
Issues and Steps to Reproduce
Add button inside YogaLayout programmatically. Button will not visible because in YogaLayout button's node won't set as a child node to the layout's node.
Expected Behavior
Views inside YogaLayout should be visible.
Actual Behavior
Add button inside YogaLayout programmatically. Button will not visible
Link to Code
TextView mTextView_TextView2 = new TextView(getContext()); mTextView_TextView2.setBackgroundColor(getContext().getResources().getColor(R.color.success_color)); mTextView_TextView2.setTextColor(Color.WHITE); mTextView_TextView2.setText("JHDFTGHDBADBMNSASBDHJASDGBMASD"); YogaNode mYogaNode_TextView2 = new YogaNode(); mYogaNode_TextView2.setFlexGrow(1); mYogaNode_TextView2.setMargin(YogaEdge.HORIZONTAL, DimentionHelper.dpToPixels(5)); mYogaLayout_RootLayout.addView(mTextView_TextView2,mYogaNode_TextView2);
Also seeing this issue. Any idea when this will be merged?
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.