我正在尝试获得 a 的高度StackLayout
。这个布局充满了来自我后端的数据,所以它并不总是相同的高度。我试过view.getViewById(parent, selector).effectiveHeight
了,但它一直在输出0
。
我的 XML 文件看起来有点像这样:
<Page>
<ActionBar title="..."></ActionBar>
<GridLayout rows="*, auto" columns="*">
<ScrollView row="0" col="0">
<GridLayout rows="*" columns="*">
<StackLayout id="TARGET" row="0" col="1">
<StackLayout *ngFor="let x of y">
<FlexboxLayout justifyContent="space-between">
<FlexboxLayout>
<StackLayout>
...
</StackLayout>
</FlexboxLayout>
<FlexboxLayout justifyContent="space-between">
...
</FlexboxLayout>
</FlexboxLayout>
</StackLayout>
</StackLayout>
<StackLayout col="0" row="0">
...
</StackLayout>
</GridLayout>
</ScrollView>
<StackLayout row="1" col="0">
...
</StackLayout>
</GridLayout>
</Page>
先感谢您!