codelab-constraint-layout icon indicating copy to clipboard operation
codelab-constraint-layout copied to clipboard

2.0.0-beta2 issue with redrawing

Open LUwaisA opened this issue 6 years ago • 1 comments

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 to View.VISIBLE. When this happens the button is not appearing. I can use the layout inspector in Android Studio and the button is View.VISIBLE with a measuredHeight and measuredWidth 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

LUwaisA avatar Oct 17 '19 16:10 LUwaisA

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

Only-IceSoul avatar Oct 24 '19 20:10 Only-IceSoul