Open LUwaisA opened 4 years ago
motion:visibilityMode="ignore" csStart.setVisibilityMode(id,ConstraintSet.VISIBILITY_MODE_IGNORE) csEnd.setVisibilityMode(id,ConstraintSet.VISIBILITY_MODE_IGNORE)
visibilityMode Beta 1 We added the ability to ignore the visibility of a view. This allows the applications to control the visibility and not have MotionLayout set it.
myView.visibility = GONE /VISIBLE
It appears there is some issue with invalidating a ConstraintLayout. I have a button which starts off with a visibility of
View.GONE
. It's constraints are connecting it to other views in the ConstraintLayout which are visible. When a network call returns successfully I am changing the button's visibility toView.VISIBLE
. When this happens the button is not appearing. I can use the layout inspector in Android Studio and the button isView.VISIBLE
with ameasuredHeight
andmeasuredWidth
of roughly the correct size. However it does show that the button is located at the top left of the ConstraintLayout and occupies no space (the button should actually be located near the bottom of the ConstraintLayout and occupy most of the width of it). It appears as though the layout is not being redrawn as all the state seems to be correct just the layout is inconsistent