flexbox-layout
flexbox-layout copied to clipboard
Dynamically calling FlexBoxLayout#addView does not work
Perhaps a duplicate of #90
Issues and steps to reproduce
- create a custom view
- implement the following method
override fun onAttachedToWindow() {
super.onAttachedToWindow()
postDelayed({
flexLayout.addView(TextView(context).apply {
text = "Hello, World!"
})
}, 1000)
- observe UI (or lack of)
note that the following works:
override fun onAttachedToWindow() {
super.onAttachedToWindow()
flexLayout.addView(TextView(context).apply {
text = "Hello, World!"
})
Expected behavior
The TextView should be added to the ViewGroup, visible, and laid out correctly
Version of the flexbox library
1.0.0
This is a React Native related issue.