简体   繁体   中英

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. so far i could only find solutions related to TabView. ( 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? it gives no output when i use.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM