Я пытаюсь создать панель навигации в нижней части моего приложения для 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. @file: ///app/main-page.xml: 7.4 > Модуль не найден элемент nativescript-bottomnavigation: BottonNavigation – Mill3r