简体   繁体   English

如何在 TabStripItem - nativescript(Angular + Android)中显示红点或数字作为徽章

[英]How can i show a red dot or a number as badge in TabStripItem - nativescript (Angular + Android )

I am working to show a notification in the form of a red dot or a number on Bottom Navigation item for Nativescript - Angular - Android.我正在努力在 Nativescript - Angular - Android 的底部导航项上以红点或数字的形式显示通知。 so far i could only find solutions related to TabView.到目前为止,我只能找到与 TabView 相关的解决方案。 ( https://discourse.nativescript.org/t/nativescript-android-add-badge-on-tabview-tabs/4768/14 ) https://discourse.nativescript.org/t/nativescript-android-add-badge-on-tabview-tabs/4768/14

How can i add the mechanism?如何添加机制? is it possible to use the StackLayout within TabStripItem?是否可以在 TabStripItem 中使用 StackLayout? it gives no output when i use.当我使用它时,它没有给出 output。

<BottomNavigation>
    <TabStrip>
      <TabStripItem>

            <Label text="Profile"></Label>
            <Image src="font://&#xf015;" class="fas "></Image>
      </TabStripItem>
    </TabStrip>
</BottomNavigation>

<TabContentItem>
        <page-router-outlet name="homeTab" actionBarVisibility="never"></page-router-outlet> 
</TabContentItem>

Thanks谢谢

As mentioned in the comment from @Manoj, the default NativeScript component doesn't support badges, but there is a Material design one in the marketplace that supports badges and it works well.正如@Manoj 的评论中所提到的,默认的 NativeScript 组件不支持徽章,但是市场上有一个支持徽章的 Material Design 组件,它运行良好。 Link . 链接

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何创建Android .keystore以发布NativeScript Angular apk - How can I create Android .keystore to release NativeScript Angular apk 当我点击 ngfor 和 ngif 时,如何仅显示项目的信息? (本机脚本/角) - How can I show only the infos of the item when i tap with ngfor and ngif? (Nativescript/Angular) 如何使用 NativeScript 和 Angular 在 Android 上更改状态栏颜色或将其设置为透明? - How can i change the StatusBar color or set it to transparent on Android, using NativeScript with Angular? 我如何在iOS / Android中嵌入NativeScript Angular应用程序并导航到现有应用程序中的某些路由 - How can i embed an NativeScript Angular app in iOS / Android and navigate to certain routes from the existing app 如何使用Nativescript和Angular 2下载文件并保存到设备? - Using Nativescript and Angular 2 how can I download a file and save to the device? 如何将 Angular 中的图像 SVG 与 NativeScript 一起使用? - How can I use images SVG in Angular with NativeScript? 如何检查一群用户在线/离线,并且在线显示绿点或在angular4中使用打字稿显示红点 - how to check the a bunch of users is in online/offline and it is online show green dots or else red dot using typescript in angular4 如何让 Jest 正确转换 node_modules/@nativescript/core? 开玩笑 + NativeScript + Angular + Nx - How can I get Jest to transpile node_modules/@nativescript/core properly? Jest + NativeScript + Angular + Nx 如何在角度 7 的垫子步骤标题图标上添加红点? - how to add a red dot on a mat step header icon in angular 7? 如何在android和nativescript angular中禁用ios中的截图 - How to disable screenshot in android and ios in nativescript angular
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM