Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Badging for Tabs and Bottom Navigation
Search
umechanhika
February 12, 2020
Programming
390
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Badging for Tabs and Bottom Navigation
umechanhika
February 12, 2020
More Decks by umechanhika
See All by umechanhika
My Workspace [2020/08版]
umechanhika
0
110
My Workspace [2020/06版]
umechanhika
0
57
Capture view and Register to gallery
umechanhika
0
73
Shape Design with Material Components
umechanhika
3
270
Firebase MLKit AutoML Vision Edgeを触ってみた
umechanhika
3
590
Google Play Consoleの時間指定公開のハマりポイント
umechanhika
1
1.6k
UIテスト初心者のチームにUIテスト自動化を導入した話
umechanhika
0
120
GoogleI/Oアプリのようなフィルター機能を実装する
umechanhika
2
550
Jenkins + Bitbucketでアプリリリースを自動化してみた
umechanhika
1
700
Other Decks in Programming
See All in Programming
AI時代のPHPer生存戦略 ~「言語、もうなんでもよくない?」に本気で向き合う~
vivion
0
320
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
270
ルールを書いて終わらせないハーネスエンジニアリング
yug1224
4
1.9k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
570
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
150
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
250
Cloudflare is Agents
chimame
0
160
【QA Test Talk Vol.8】AI-DLC による Whole Team Approach の加速
pkshadeck
PRO
0
180
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
110
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
220
Laravelで学ぶ Webアプリケーションチューニング入門/web_application_tuning_101
hanhan1978
4
1.8k
【やさしく解説 設計編・中級 #4】ルールの寿命と、システムの年輪
panda728
PRO
2
180
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.3k
We Are The Robots
honzajavorek
0
300
The Pragmatic Product Professional
lauravandoore
37
7.4k
How STYLIGHT went responsive
nonsquared
100
6.2k
Being A Developer After 40
akosma
91
590k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
370
Automating Front-end Workflow
addyosmani
1369
210k
Navigating Weather and Climate Data
rabernat
0
470
So, you think you're a good person
axbom
PRO
2
2.1k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Facilitating Awesome Meetings
lara
57
7.1k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.2k
Transcript
Badging for Tabs and Bottom Navigation
About me Hikaru Umetsu (@umechanhika) Fintech startup Individual developer Fav:
Android & Flutter Individual Job ?
Material Components 1.1.0 released !
Today’s topic
Badging for Tabs and Bottom Navigation Reference:https://material.io/develop/android/components/tab-layout/
Use “BadgeDrawable” val tabBadge: BadgeDrawable = tabLayout.getTabAt(0)?.orCreateBadge val navBadge: BadgeDrawable
= bottomNavigation.getOrCreateBadge(R.id.menu1)
Use “BadgeDrawable” val tabBadge: BadgeDrawable = tabLayout.getTabAt(0)?.orCreateBadge val navBadge: BadgeDrawable
= bottomNavigation.getOrCreateBadge(R.id.menu1)
val tabBadge: BadgeDrawable = tabLayout.getTabAt(0)?.orCreateBadge tabBadge.isVisible = true Show “Dot
badge” Reference:https://material.io/develop/android/components/tab-layout/
Show “Badge with number” val tabBadge: BadgeDrawable = tabLayout.getTabAt(0)?.orCreateBadge tabBadge.number
= 99 tabBadge.isVisible = true Reference:https://material.io/develop/android/components/tab-layout/
Show “Badge with a maximum count” val tabBadge: BadgeDrawable =
tabLayout.getTabAt(0)?.orCreateBadge tabBadge.maxCharacterCount = 3 tabBadge.number = 1000 tabBadge.isVisible = true Reference:https://material.io/develop/android/components/tab-layout/
Caution max “character” count It can shows “9+”, “99+” or
etc. It cannot shows “5+”, “10+” or etc. Reference:https://material.io/develop/android/components/tab-layout/
Remove badges tabLayout.getTabAt(0)?.removeBadge() Reference:https://material.io/develop/android/components/tab-layout/
Demo Reference:https://github.com/umechanhika/playground/tree/master/android/BadgeDrawableSample
Tab and BottomNav can show badges since MDC 1.1.0 Use
BadgeDrawable It can show “Dot”, “Number” and “Maximum count” badge Summary
Thanks!