出于某些疯狂的原因,我无法在ActionBar上或在ActionBar中工作 .
我假设这个问题是由我的自定义ActionBar设置 ActionBar.titleView
引起的 . 但是,根据我目前的理解,我设置了这种方式,以便为 Headers 设置自定义字体 .
我把它设置如下..
<RadSideDrawer #drawer>
<StackLayout tkDrawerContent class="sideStackLayout">
<StackLayout class="sideTitleStackLayout">
<Label [text]="name"></Label>
</StackLayout>
<StackLayout class="sideStackLayout">
<Label text="Dashboard" class="sideLabel sideLightGrayLabel"></Label>
<Label text="Sessions" class="sideLabel"></Label>
<Label text="Starred" class="sideLabel"></Label>
</StackLayout>
</StackLayout>
<StackLayout tkMainContent>
<ActionBar>
<ActionBar.titleView>
<Label text="Dashboard"></Label>
</ActionBar.titleView>
<ActionItem
*ngIf="!gameOn"
id="startsessbtn"
(tap)="startSession()"
text="start"
ios.systemIcon="4"
ios.position="right"
android.systemIcon="ic_menu_add"
android.position="actionBar">
</ActionItem>
<ActionItem
*ngIf="gameOn"
id="startsessbtn"
(tap)="endSession()"
text="end"
ios.systemIcon="4"
ios.position="right"
android.systemIcon="ic_menu_edit"
android.position="actionBar">
</ActionItem>
</ActionBar>
<StackLayout>....</StackLayout>
</StackLayout>
</RadSideDrawer>
我想要做的是在这种情况下显示一个ActionItem取决于布尔值 gameOn
但这只是不起作用 .
1 回答
NativeScript Angular中不存在