Closed TwunTee closed 6 years ago
I'm not 100% sure this is a bug. The value returned by bottom
is context-dependent, because if you set top="previous.bottom"
on a view then you want bottom
to be the absolute position relative to the containing view, but if you set bottom="previous.bottom"
then you want it to be the exact value you specified in the expression.
Can you show me the context in which you are using it?
I am trying to create a layout like
Title
Subtitle
The layout code is
<UILabel id="title" top="parent.bottom" text="Title"/>
<UILabel id="subTitle" top="#title.bottom" text="SubTitle"/>
In the above code subTitle aligns on the top instead of bottom of title but if i use previous.bottom it gets aligned correctly
<UILabel id="title" top="parent.bottom" text="Title"/>
<UILabel id="subTitle" top="previous.bottom" text="SubTitle"/>
If I use legacy layout both work as they should ie subTitle gets aligned at the bottom of title.
@TwunTee I've pushed a fix to the develop branch.
@TwunTee the fix has landed in version 0.6.29. Thanks for reporting it!
I am using the new layout system using legacy layout = false. When i am using previous.bottom the view gets the value properly but if i access the bottom property of the view through id reference like #viewId.bottom the value is wrong, other properties like left and top seem to work fine