I have a ConstraintLayout
and I'm adding a maxHeight constraint by using constraintSet.constrainMaxHeight(R.id.recyclerView, (Utils.getScreenHeight() / 2.2).toInt())
Later in my excecution I need to remove this max height constraint, so I do:
constraintSet.connect(R.id.recyclerView, TOP, PARENT, TOP)
constraintSet.constrainHeight(R.id.recyclerView, MATCH_CONSTRAINT)
constraintSet.constrainMaxHeight(R.id.liveFeedRecyclerView, UNSET)
However, my recyclerView still has the "max height" assigned to it. What is the proper way of unsetting the max height constraint and setting my view's height to Match Constraint?
P.S.: All the Constant values are the constants found in the ConstraintSet
class.