typescript - 如何在 Nativescript 的底部导航中添加操作栏
问题描述
我正在尝试将操作抽屉或操作栏添加到底部导航,有什么想法吗?我使用打字稿
我阅读了 nativescript 文档,似乎没有找到任何关于它的信息。
请帮忙
这是我的代码如下:
<BottomNavigation selectedIndex="0">
<TabStrip>
<TabStripItem>
<Label text="Home"></Label>
<Image src="font://" class="fas t-36"></Image>
</TabStripItem>
<TabStripItem class="special">
<Label text="Profile"></Label>
<Image src="font://" 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://" class="fasl t-36l"></Image>
<Label text="Sign up for an account" class="align1"/>
<Button text="Sign up" tap="navigateToFeatured" class="signupcolor"/>
</StackLayout>
</TabContentItem>
解决方案
您最好的选择是使用“在向前导航中横向嵌套”模式。使用 Frame 作为根视图,并为其设置一个主页。在此页面内,添加您的操作栏和 BottomNavigation 本身。没错,BottomNavigation 也可以嵌套在页面内。
有关更多信息,您可以查看文档:https ://docs.nativescript.org/core-concepts/nested-navigation
推荐阅读
- gradient - 如何在图层或选区上创建透明度渐变?
- coldfusion - Coldfusion 将数据库中的结果与商店信息和商店营业时间合并,我知道我错过了
- sql-server - Azure devops SqlAzureDacpacDeployment 任务无法删除数据库?
- python-3.x - 使用 Select_by_value 函数传递字符串变量时出现 InvalidSelectorException
- powerbi - 计算父表中符合条件的行,并且在子表中至少有一条符合条件的记录
- sql-server - smalldatetime 列上的索引
- swift - UISegmentedControl和View切换问题
- azure-service-fabric - 托管标识和 Service Fabric 本地群集
- python - 如何控制python中bin的大小以使用numpy.histogram
- java - com.google.firebase.database.DatabaseException:无法将 java.lang.String 类型的对象转换为 com.example.chocolate.ModelChatlist 类型