gpt4 book ai didi

ios - Nativescript+Angular 上的 ListView 只占了竖屏的一半。使用 Iphone 模拟器

转载 作者:太空宇宙 更新时间:2023-11-04 06:37:39 24 4
gpt4 key购买 nike

我在 actionBar 下有一个 ListView ,它似乎只占用了屏幕垂直空间的一半。列表在半个屏幕内滚动。

<StackLayout orientation="vertical" height="100%">
<ActionBar class="action-bar">
<NavigationButton visibility="collapsed"></NavigationButton>
<GridLayout columns="auto,*,auto" height="100%" width="100%">
<Label col="0" text="&#xf0c9;" class="fa" (tap)="onDrawerButtonTap()"></Label>
<Label col="1" text="Menu" class="action-bar-title"></Label>
</GridLayout>
</ActionBar>
<!-- <ScrollView orientation="vertical"> -->
<ListView [items]="restaurant_menu" class="list-group">
<ng-template let-item="item" let-i="index">
<StackLayout orientation="vertical" class="list-group-item">
<Label [text]="item.name"></Label>
<GridLayout columns="*,auto,auto,auto" rows="auto" orientation="horizontal" class="list-group-item">
<Label [text]="'Rs. '+item.price" col="0" row="0" verticalAlignment="top"></Label>
<Label *ngIf="order && order[item.name]>0" text="-" col="1" row="0" verticalAlignment="top" horizontalAlignment="right"></Label>
<Label *ngIf="order && order[item.name]>0" [text]="order[item.name]" col="1" row="0" verticalAlignment="top" horizontalAlignment="right"></Label>
<Label (tap)="build_order(item.name, '+')" text="+" col="1" row="0" verticalAlignment="top" horizontalAlignment="right"></Label>
</GridLayout>
</StackLayout>
</ng-template>
</ListView>
<!-- </ScrollView> -->
</StackLayout>

将高度设置为 100% 不会改变结果。我错过了什么?我正在使用 native-core-theme 并且没有更改决定高度的 css。

最佳答案

尝试移除 ActionBar 上方的 StackLayout。 ActionBar 应该是 Page 实例的一部分,或者在 {N} Angular 的情况下只是在根级别。 ListView 可以放在它的正下方,你不需要 StackLayout 来包裹它们。

关于ios - Nativescript+Angular 上的 ListView 只占了竖屏的一半。使用 Iphone 模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54079729/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com