is there a known issue with using a group inside M...
# android
r
is there a known issue with using a group inside MotionLayout to change visibility? Seems like it does not work
so in my xml layout I have this group:
Copy code
<androidx.constraintlayout.widget.Group
    android:id="@+id/dual_sim_group"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    app:constraint_referenced_ids="sim_card_buttons_group, simcards_title, holder_icon_info_sim_card, holder_icon_info_sim_card, divider_simcard_numbers"
    tools:visibility="gone" />
when I call
binding.dualSimGroup.isVisible = false
nothing happens
or should this group be inside the xml motionscene?
none of the referenced views are animating or mentioned in the xml motionscene. Some other views are but not the ones in the group.
j
So first I want to say this is not part of the topic as it is unrelated to using kotlin for android development
Second in motionlayout you cannot just change visibility of elements out of the box outside from the motion scene
you have to mess with the visibilityMode of the children
I am just not sure how it would work with groups, perhaps you would need to set it for every constraint, but it will be fun to figure that out 🙂
r
thnx, had the same issue. Should be better documented in the docs though. Hard to find otherwise.