我想在我的android應用程序的底部創建導航欄。我正在使用NativeScript來創建應用程序。有沒有插件可以做到這一點?Android應用程序的底部導航欄(NativeScript)
<page
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:drawer="nativescript-telerik-ui/sidedrawer"
xmlns:widgets="shared/widgets"
xmlns:statusbar="nativescript-statusbar"
xmlns:bottomnav="nativescript-bottomnavigation"
loaded="pageLoaded">
<statusbar:StatusBar ios:barStyle="light" />
<page.actionBar>
<action-bar title="NativeScript">
<navigation-button icon="res://ic_menu" tap="toggleDrawer" ios:visibility="collapsed" />
<action-bar.actionItems>
<ios>
<action-item icon="res://ic_menu" ios.position="left" tap="toggleDrawer" />
</ios>
</action-bar.actionItems>
<ActionItem tap="onDelete" ios.systemIcon="16" ios.position="right" text="Delete" android.position="popup"/>
<ActionItem id="logoutButton" tap="logOut" ios.systemIcon="16" ios.position="right" text="LogOut" android.position="popup"/>
</action-bar></page.actionBar>
<drawer:rad-side-drawer id="drawer">
<drawer:rad-side-drawer.mainContent>
<!-- Home page contents -->
<StackLayout loaded="contentLoaded">
<image src="https://i.imgur.com/LY3cb3A.png" id="logo" tap="fun" height="100" margin="20 0 0 0" />
<label text="Welcome to the NativeScript drawer template! This is the home page. Try tapping the logo." margin="20" horizontalAlignment="center" textWrap="true" />
</StackLayout>
</drawer:rad-side-drawer.mainContent>
<drawer:rad-side-drawer.drawerContent>
<widgets:drawer-content />
</drawer:rad-side-drawer.drawerContent>
</drawer:rad-side-drawer>
幾個解決方案:http://forum.nativescript.org/t/android-tabview-to-look-like-ios/215 –
我我還會補充一點,我開始移植下面提到的本地庫之一:https://github.com/bradmartin/nativescript-bottomnavigation - 我從來沒有時間完成,但有人開始了我所做的和發佈的內容一個插件。我認爲這是回購:https://github.com/kobby-sun/nativescript-bottomnavigation已經有一段時間了,因爲我已經看過它。 –
我克隆存儲庫,並試圖運行它,但它給出了一個錯誤。 錯誤:從XML構建UI。 @file:///app/main-page.xml:7.4 >模塊未找到元素nativescript-bottomnavigation:BottonNavigation – Mill3r