这是一个伪代码,可为您提供所需的布局。
<GridLayout>
<GridLayout rows="*,auto">
<StackLayout row="0" backgroundColor="#ccc">
<Label text="Your Content" fontSize="30" textAlignment="center"></Label>
</StackLayout>
<GridLayout row="1" columns="*,*" height="48">
<StackLayout col="0">
<Image></Image>
<Label text="Groups" textAlignment="center"></Label>
</StackLayout>
<StackLayout col="1">
<Image></Image>
<Label text="Communities" textAlignment="center"></Label>
</StackLayout>
</GridLayout>
</GridLayout>
<GridLayout borderRadius="50%" width="68" height="68" backgroundColor="#ec5281"
verticalAlignment="bottom" horizontalAlignment="center" marginBottom="20">
<Label text="Post" color="white" verticalAlignment="center"
horizontalAlignment="center"></Label>
</GridLayout>
</GridLayout>
在https://www.nslayouts.com/上了解有关NativeScript布局的更多信息,也可以在Marketplace中找到示例项目。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句