You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When views orders are like these and all are optional.
View1
(10dp margin between 1-2)
View2
(20dp margin between 2-3)
View3
If I set view3's layout_marginTop=20dp and layout_goneMarginTop=10dp(if view2 is gone)
but then it can't handle the case that both view1 and view2 are gone.
To satisfy the design specification, I wish I can specify each margin and anchor combination.
for View3
layout_constraintTop_toBottomWithMargin="@id/view2 20dp" // if view2 is visible
layout_constraintGoneMarginTop1="@id/view1 10dp" // if view2 is gone
layout_constraintGoneMarginTop2="parent 0dp" // if view1&2 is gone
Specifying margin and anchor(=constraint) together makes sense because
in ConstraintLayout, marginTop is no use without constraintTop.
I added number suffix Top1, Top2, ... because xml doesn't allow dupicate attribute.
and I know specifying reference and dimension together is against the rule and require 'string' type.
I think there would be better format than this.
The text was updated successfully, but these errors were encountered:
When views orders are like these and all are optional.
View1
(10dp margin between 1-2)
View2
(20dp margin between 2-3)
View3
If I set view3's layout_marginTop=20dp and layout_goneMarginTop=10dp(if view2 is gone)
but then it can't handle the case that both view1 and view2 are gone.
To satisfy the design specification, I wish I can specify each margin and anchor combination.
for View3
layout_constraintTop_toBottomWithMargin="@id/view2 20dp" // if view2 is visible
layout_constraintGoneMarginTop1="@id/view1 10dp" // if view2 is gone
layout_constraintGoneMarginTop2="parent 0dp" // if view1&2 is gone
Specifying margin and anchor(=constraint) together makes sense because
in ConstraintLayout, marginTop is no use without constraintTop.
I added number suffix Top1, Top2, ... because xml doesn't allow dupicate attribute.
and I know specifying reference and dimension together is against the rule and require 'string' type.
I think there would be better format than this.
The text was updated successfully, but these errors were encountered: