how to add action bar in bottom navigation in Nativescript

Viewed 157

i'm trying to add an action drawer or an action bar to bottom navigation, any ideas how? im using typescript

i read the nativescript docs and dont seem to find anym information about it.

please help

here is my code below:

   <BottomNavigation selectedIndex="0">


<TabStrip>
    <TabStripItem>
        <Label text="Home"></Label>
        <Image src="font://&#xf015;" class="fas t-36"></Image>
    </TabStripItem>

    <TabStripItem class="special">
        <Label text="Profile"></Label>
        <Image src="font://&#xf007;" class="fas t-36"></Image>
    </TabStripItem>
</TabStrip>


<TabContentItem>

        <StackLayout>

        <VideoPlayer:Video id="nativeVideoPlayer"
        controls="true" loop="true" autoplay="true" Height="1000" scaleY="1.2"
        src="~/Videos/v2.mp4" />



    </StackLayout>

</TabContentItem>

<TabContentItem class="pp">



  <StackLayout>

    <Image src="font://&#xf2bd;" class="fasl t-36l"></Image>
     <Label text="Sign up for an account" class="align1"/>
    <Button text="Sign up" tap="navigateToFeatured" class="signupcolor"/>

  </StackLayout>




</TabContentItem>

1 Answers

Your best option is to use "Nesting Lateral in Forward Navigation" pattern. Use a Frame as a root view, and have a main page for it. Inside this page, add your action bar and BottomNavigation itself. That's right, BottomNavigation can also be nested inside pages.

For more information, you can take a look at the docs: https://docs.nativescript.org/core-concepts/nested-navigation

Related