$30 off During Our Annual Pro Sale. View Details »
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
350
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
98
My Workspace [2020/06版]
umechanhika
0
43
Capture view and Register to gallery
umechanhika
0
57
Shape Design with Material Components
umechanhika
3
250
Firebase MLKit AutoML Vision Edgeを触ってみた
umechanhika
3
550
Google Play Consoleの時間指定公開のハマりポイント
umechanhika
1
1.6k
UIテスト初心者のチームにUIテスト自動化を導入した話
umechanhika
0
110
GoogleI/Oアプリのようなフィルター機能を実装する
umechanhika
2
520
Jenkins + Bitbucketでアプリリリースを自動化してみた
umechanhika
1
660
Other Decks in Programming
See All in Programming
認証・認可の基本を学ぼう前編
kouyuume
0
190
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
9
1.1k
tparseでgo testの出力を見やすくする
utgwkk
1
190
20 years of Symfony, what's next?
fabpot
2
350
AWS CDKの推しポイントN選
akihisaikeda
1
240
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
120
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
120
ソフトウェア設計の課題・原則・実践技法
masuda220
PRO
26
22k
20251127_ぼっちのための懇親会対策会議
kokamoto01_metaps
2
420
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
170
AIコードレビューがチームの"文脈"を 読めるようになるまで
marutaku
0
350
Building AI Agents with TypeScript #TSKaigiHokuriku
izumin5210
6
1.3k
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Bash Introduction
62gerente
615
210k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
122
21k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.6k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
The Pragmatic Product Professional
lauravandoore
37
7.1k
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!