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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
umechanhika
February 12, 2020
Programming
380
0
Share
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
53
Capture view and Register to gallery
umechanhika
0
61
Shape Design with Material Components
umechanhika
3
260
Firebase MLKit AutoML Vision Edgeを触ってみた
umechanhika
3
580
Google Play Consoleの時間指定公開のハマりポイント
umechanhika
1
1.6k
UIテスト初心者のチームにUIテスト自動化を導入した話
umechanhika
0
110
GoogleI/Oアプリのようなフィルター機能を実装する
umechanhika
2
540
Jenkins + Bitbucketでアプリリリースを自動化してみた
umechanhika
1
680
Other Decks in Programming
See All in Programming
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
460
AWSはOSSをどのように 考えているのか?
akihisaikeda
0
120
書き換えて学ぶTemporal #fukts
pirosikick
2
380
SREに優しいTerraform構成 modulesとstateの組み方
hiyanger
2
180
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
1
250
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
110
過去のレビュー知見をSkillsで資産化した話
pkshadeck
PRO
1
2k
My daily life on Ruby
a_matsuda
3
390
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1.1k
AgentCore Optimizationを始めよう!
licux
3
240
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
510
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
160
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
21k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
110
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
300
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
120
Reality Check: Gamification 10 Years Later
codingconduct
0
2.1k
AI: The stuff that nobody shows you
jnunemaker
PRO
7
640
Rails Girls Zürich Keynote
gr2m
96
14k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.9k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
530
From π to Pie charts
rasagy
0
180
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
500
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!