Gridlayout在另一个内部排一行

问题描述 投票:0回答:1

我是NativeScript的新手。我无法通过gridlayout容器获得简单的表格布局。这是我的标记

<GridLayout columns="*, 100, 100" rows="auto">
  <Label text="ΕΣΟΔΑ" row="0" col="0" colSpan="3" fontSize="20" class="font-weight-bold"></Label>
  <Label text="Έσοδα Παροχής Υπηρεσιών" row="1" col="0" fontSize="20"></Label>
  <TextField 
       row="1" col="1"
       keyboardType="number"
       returnKeyType="done" 
       class="input input-border"></TextField>
  <Label text="50%" textAlignment="right" row="1" col="2" backgroundColor="green" fontSize="20" verticalAlignment="middle"></Label>
</GridLayout>

这是输出

enter image description here

我希望第一个标签跨越整个第一行。我尝试更改col值或删除col,没有任何效果。

nativescript angular2-nativescript
1个回答
0
投票

你有一个1行,你需要2个或更多<GridLayout columns="*, 100, 100" rows="auto,auto">这应该排序你的意见

© www.soinside.com 2019 - 2024. All rights reserved.