android-ConstraintLayoutExamples icon indicating copy to clipboard operation
android-ConstraintLayoutExamples copied to clipboard

MotionLayout: View visibility resets when transition starts

Open Saba-21 opened this issue 7 years ago • 4 comments

View in xml is visible, I set different visibility programmatically,
When transition starts view visibility is reset to that is declared in xml transition has OnSwipe event I'm using version - 2.0.0-alpha3

Saba-21 avatar Jan 23 '19 12:01 Saba-21

Thanks for reporting this.

The issue was filed for MotionLayout https://issuetracker.google.com/issues/122090772 and is planed to be fixed in the next release.

Let me close this for now since this is not an issue with the examples.

thagikura avatar Jan 30 '19 05:01 thagikura

Greetings,

I still face this issue in 2.0.0-beta1. When will this be fixed?

AniruddhaKulk avatar Jun 05 '19 02:06 AniruddhaKulk

They added in ConstraintLayout 2.0.0 beta 1 the ability to ignore the visibility of a view. This allows the applications to control the visibility and not have MotionLayout set it.

motion:visibilityMode="ignore"

m4fi3ux avatar Jun 05 '19 14:06 m4fi3ux

They added in ConstraintLayout 2.0.0 beta 1 the ability to ignore the visibility of a view. This allows the applications to control the visibility and not have MotionLayout set it.

motion:visibilityMode="ignore"

Yea, found it in the documentation and forgot to delete my comment. Thank you

AniruddhaKulk avatar Jun 05 '19 14:06 AniruddhaKulk