flexbox-layout icon indicating copy to clipboard operation
flexbox-layout copied to clipboard

Dynamically calling FlexBoxLayout#addView does not work

Open jlmcdonnell opened this issue 7 years ago • 1 comments

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

jlmcdonnell avatar May 30 '19 12:05 jlmcdonnell

This is a React Native related issue.

jlmcdonnell avatar May 30 '19 14:05 jlmcdonnell