Assigned
Status Update
Comments
ho...@google.com <ho...@google.com> #2
Can you attach / share a project that reproduces the issue?
dk...@3cx.com <dk...@3cx.com> #3
Now i sure this is viewpager2's bug.
because just occur recyclerview inside viewpager2 with constraintlayout, if paging3 use Independently with viewpage2 it's not problem.
because just occur recyclerview inside viewpager2 with constraintlayout, if paging3 use Independently with viewpage2 it's not problem.
Description
ConstraintLayout version: 2.1.4
Currently, when I specify
layout_constraintHeight_percent
, the height is calculated not on the basis of the height of the area determined by constrains of the view, but is based on the parent's height. The constraints are simply ignored in the matter of size and are used only to obtain the position. I have no choice except creating a nestedConstraintLayout
with proper constraints just to place there one view with a relative height. Such workarounds contradict the philosophy of ConstraintLayout, which encourages to avoid nested layouts.I understand that changing already existing semantics of
app:layout_constraintHeight_default="percent"
is impossible, but maybe you could introduce a new value for it, e.g.app:layout_constraintHeight_default="constrained_percent"
which will measure the size based on the specified constraints instead of the parent's dimensions.The original code:
The workaround: