【发布时间】:2018-06-28 15:58:41
【问题描述】:
我正在尝试使 nativescript 上的网格布局工作,但我得到了这个结果:
这是我的 XML
<Page class="page" navigatingTo="onNavigatingTo"
xmlns="http://schemas.nativescript.org/tns.xsd" actionBarHidden="true">
<StackLayout class="p-5">
<ScrollView>
<StackLayout orientation="vertical">
<GridLayout rows="*, *" columns="50%,40%,10%" width="100%" backgroundColor="#888">
<Label text="option" class="h2 m-y-auto" width="100%" textWrap="true" row="0" col="0" backgroundColor="#f00" />
<Label text="value" class="h2 text-primary m-y-auto" width="100%" row="0" col="1" backgroundColor="#0f0" />
<Button text="U" tap="{{openData}}" class="btn btn-primary btn-active p-0 m-0" width="100%" row="0" col="2" backgroundColor="#00f" />
<Button text="D" tap="{{openData}}" class="btn btn-primary btn-active p-0 m-0" width="100%" row="1" col="2" backgroundColor="#ff0" />
</GridLayout>
</StackLayout>
</ScrollView>
</StackLayout>
</Page>
谢谢!!!!!!
【问题讨论】:
-
你的期望结果是什么?
-
请添加游乐场演示
标签: android nativescript