ListView在ScrollView和StackLayout中实现时不会渲染,在ios中方向水平,但在android中呈现相同 - 垂直和水平缩放表
<ScrollView orientation="horizontal">
<StackLayout orientation="horizontal">
<RadListView for="todo in monthlyMeterData">
<v-template>
<GridLayout columns="150,100,100,100,100,100,100,100,100,100,100,100,100,100">
<Label :text="todo.region" col="0"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="1"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="2"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="3"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="4"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="5"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="6"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="7"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="8"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="9"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="10"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="11"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="12"/>
<Label :text="getMonthData(todo.monthlyCount,'January')" col="13"/>
</GridLayout>
</v-template>
</RadListView>
</StackLayout>
</ScrollView>
爱欧斯安卓
由于某种原因,在iOS上,RadListView宽度没有被正确计算。由于列具有固定宽度,因此可以强制使用总宽度 (1450)。另外,您不需要该<StackLayout>
。我用这段代码得到了它:
<ScrollView orientation="horizontal">
<RadListView for="todo in monthlyMeterData" width="1450">
<v-template>
<GridLayout columns="150,100,100,100,100,100,100,100,100,100,100,100,100,100">
<!-- ... -->
我希望它有所帮助!