【问题标题】:how to add action bar in bottom navigation in Nativescript如何在 Nativescript 的底部导航中添加操作栏
【发布时间】:2020-06-16 20:48:32
【问题描述】:

我正在尝试将操作抽屉或操作栏添加到底部导航,有什​​么想法吗? 我正在使用打字稿

我阅读了 nativescript 文档,但似乎没有找到任何关于它的信息。

请帮忙

下面是我的代码:

   <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>

【问题讨论】:

    标签: typescript nativescript


    【解决方案1】:

    您最好的选择是使用“在向前导航中横向嵌套”模式。 使用 Frame 作为根视图,并为其设置一个主页。在此页面内,添加您的操作栏和 BottomNavigation 本身。没错,BottomNavigation 也可以嵌套在页面内。

    有关更多信息,您可以查看文档:https://docs.nativescript.org/core-concepts/nested-navigation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-11-08
      • 1970-01-01
      • 1970-01-01
      • 2022-12-07
      • 1970-01-01
      • 1970-01-01
      • 2020-01-14
      • 1970-01-01
      相关资源
      最近更新 更多