Is there any way to define childHeight as more important than its siblings and propagate its size to (less important) siblings.
Consider this layout
<RelativeLayout
match_parent,match_parent>
<FrameLayout
match_parent,match_parent>
<ViewA
this view size is important and its siblings should have same size, set on Runtime.
layout_gravity="center"/>
<ViewB
match_parent,match_parent
layout_gravity="center"
(should have the size of ViewB) />
</FrameLayout>
</RelativeLayout>
I know how to do it using ConstrainLayout but I am asking just out of curiosity
<ConstraintLayout>
<ViewA
wrap_content,wrap_content
constraint_to="parent"/>
<ViewB
0dp,0dp
constraint_to="ViewA"
layout_gravity="center"
(should have the size of ViewA) />
</ConstraintLayout>
Use case I have cameraView (ViewA) and cameraOverlay (ViewB). ViewA changes it's size according to user preference (16:9 | 4:3...) and ViewB (has some alpha) must always overlap whole ViewA.
Edit: Forgot to add that I don't want to change size of viewB manually