I created Views programmatically, added them to my root-constraint-layout and linked them to Flow by using setReferencedIds. While this gives me perfect control over the arrangement as it is inteded by Flow, it is not possible to hide and show referenced Elements. I assumed the behaviour to be equal to Group behaviour as the Flow knows its references and thereby should be enabled to hide them.
The use of setVisibility(View.GONE) only hides the Flow itself, which disables the arrangement of referenced Views. The Views itself are stuck to the underlying constraintlayout (which seems correct, as they were added to it.)
❓
Is the difference in behavior between Group and Flow intentionally or is it a bug?
From my point of view the latter is the case.
Current workaround:
Additional group created and added to constraint-layout.
Hi, I encountered above mentioned problem today.
I created Views programmatically, added them to my root-constraint-layout and linked them to Flow by using setReferencedIds. While this gives me perfect control over the arrangement as it is inteded by Flow, it is not possible to hide and show referenced Elements. I assumed the behaviour to be equal to Group behaviour as the Flow knows its references and thereby should be enabled to hide them. The use of setVisibility(View.GONE) only hides the Flow itself, which disables the arrangement of referenced Views. The Views itself are stuck to the underlying constraintlayout (which seems correct, as they were added to it.)
❓
Is the difference in behavior between Group and Flow intentionally or is it a bug? From my point of view the latter is the case.
Current workaround: