我想在我的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