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
0
370
Badging for Tabs and Bottom Navigation
umechanhika
February 12, 2020
Tweet
Share
More Decks by umechanhika
See All by umechanhika
My Workspace [2020/08版]
umechanhika
0
100
My Workspace [2020/06版]
umechanhika
0
47
Capture view and Register to gallery
umechanhika
0
59
Shape Design with Material Components
umechanhika
3
260
Firebase MLKit AutoML Vision Edgeを触ってみた
umechanhika
3
570
Google Play Consoleの時間指定公開のハマりポイント
umechanhika
1
1.6k
UIテスト初心者のチームにUIテスト自動化を導入した話
umechanhika
0
110
GoogleI/Oアプリのようなフィルター機能を実装する
umechanhika
2
530
Jenkins + Bitbucketでアプリリリースを自動化してみた
umechanhika
1
670
Other Decks in Programming
See All in Programming
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
330
今、アーキテクトとして 品質保証にどう関わるか
nealle
0
200
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.6k
Premier Disciplin for Micro Frontends Multi Version/ Framework Scenarios @OOP 2026, Munic
manfredsteyer
PRO
0
200
あなたはユーザーではない #PdENight
kajitack
4
290
Oxlint JS plugins
kazupon
1
1.2k
Swift ConcurrencyでよりSwiftyに
yuukiw00w
0
230
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
430
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
120
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
8
2.2k
AI活用のコスパを最大化する方法
ochtum
0
120
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
4
360
Featured
See All Featured
Ruling the World: When Life Gets Gamed
codingconduct
0
160
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
560
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Thoughts on Productivity
jonyablonski
75
5.1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Odyssey Design
rkendrick25
PRO
2
530
Speed Design
sergeychernyshev
33
1.6k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
360
Practical Orchestrator
shlominoach
191
11k
Building Applications with DynamoDB
mza
96
6.9k
Designing Experiences People Love
moore
143
24k
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!