不負(fù)相思意
2021-04-30 13:50:40
我的問題我在特定頁(yè)面上使用了一個(gè)簡(jiǎn)單的TabView。<Page class="page" navigatingTo="onNavigatingTo" xmlns="http://schemas.nativescript.org/tns.xsd"> <ActionBar class="action-bar"> <!-- Use the NavigationButton as a side-drawer button in Android because ActionItems are shown on the right side of the ActionBar --> <NavigationButton ios:visibility="collapsed" icon="res://menu" tap="onDrawerButtonTap"></NavigationButton> <!-- Use the ActionItem for IOS with position set to left. Using the NavigationButton as a side-drawer button in iOS is not possible, because its function is to always navigate back in the application. --> <ActionItem icon="res://navigation/menu" android:visibility="collapsed" tap="onDrawerButtonTap" ios.position="left"> </ActionItem> <Label class="action-bar-title" text="Browse"></Label> </ActionBar> <TabView androidTabsPosition="bottom"> <TabViewItem title="first tab"> <Frame defaultPage="home/home-page"></Frame> </TabViewItem> <TabViewItem title="2222 tab"> <Frame defaultPage="search/search-page"></Frame> </TabViewItem> </TabView></Page>如您所見,當(dāng)我們到達(dá)此頁(yè)面時(shí),我們將看到底部的標(biāo)簽。但是,當(dāng)我們單擊選項(xiàng)卡之一時(shí),就會(huì)出現(xiàn)問題。發(fā)生的是,它正在導(dǎo)入整個(gè)頁(yè)面,包括標(biāo)題欄。屏幕截圖錯(cuò)誤理想的解決方案我希望能夠使用Frame標(biāo)記在TabView中導(dǎo)入頁(yè)面,但這樣做時(shí)要排除ActionBar。當(dāng)我們直接導(dǎo)航到頁(yè)面時(shí),我想顯示操作欄。這可能嗎?如果是這樣,您能指出我正確的方向嗎?這是我的代碼慘敗...操場(chǎng)上的在線演示感謝您的光臨,約翰
1 回答

瀟瀟雨雨
TA貢獻(xiàn)1833條經(jīng)驗(yàn) 獲得超4個(gè)贊
您可以將actionBarHidden屬性設(shè)置為false在Page您不希望出現(xiàn)的操作欄上。
如果你不希望在整個(gè)操作欄Frame,然后設(shè)置actionBarVisibility要never在Frame自身。
<TabView>
<TabViewItem title="first tab">
<Frame defaultPage="home/home-page" actionBarVisibility="never"></Frame>
</TabViewItem>
<TabViewItem title="2222 tab">
<Frame defaultPage="search/search-page" actionBarVisibility="never"></Frame>
</TabViewItem>
</TabView>
添加回答
舉報(bào)
0/150
提交
取消