Angular 如何在操作栏“Nativescript”中添加三个操作项
我想要一个菜单栏图标在左边,一个标签在中间,最后是另一个添加图标,这将打开模式,但我面临的问题是,添加图标是放置在左上方的菜单栏图标每次 我试过android.position,里面有一个stacklayout,但还是一样的问题Angular 如何在操作栏“Nativescript”中添加三个操作项,angular,nativescript,Angular,Nativescript,我想要一个菜单栏图标在左边,一个标签在中间,最后是另一个添加图标,这将打开模式,但我面临的问题是,添加图标是放置在左上方的菜单栏图标每次 我试过android.position,里面有一个stacklayout,但还是一样的问题 它每次都会覆盖左边的一个。将此示例代码用于带有三个操作项的自定义操作栏 Nativescript代码:- <ActionBar backgroundColor="#007FA3"> <GridLayout columns=&
它每次都会覆盖左边的一个。将此示例代码用于带有三个操作项的自定义操作栏 Nativescript代码:-
<ActionBar backgroundColor="#007FA3">
<GridLayout columns="auto,*,auto" orientation="horizontal" ios:padding="0 10" height="100%" width="100%">
<Image width="25" height="25" src="~/app/icons/left_wht.png" horizontalAlignment="left"
verticalAlignment="center" class="action-bar-nav" col="0" tintColor="#ffffff">
</Image>
<Label text="PageTitle" fontSize="22" color="white" horizontalAlignment="center" verticalAlignment="center"
col="1"></Label>
<Image width="25" height="25" src="~/app/icons/shopping-cart.png" verticalAlignment="center" col="2"
tintColor="#ffffff" marginRight="15"></Image>
</GridLayout>
</ActionBar>
Android本质上不允许您将ActionItem放在左侧。这是iOS唯一的功能。您可以在NavigationButton上指定所需的图标,这可能会给您提供等效的或完全使用操作栏上的图标,这也将允许您将标签放在中心。好的,但我必须使用标签而不是NavigationButton来实现它