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
70
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
690
Other Decks in Programming
See All in Programming
Claude Team Plan導入・ガイド
tk3fftk
0
220
AIが無かった頃の素敵な出会いの話
codmoninc
1
160
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
1
2.8k
Foundation Models frameworkで画像分析
ryodeveloper
1
130
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
170
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
210
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
110
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
150
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
광주소프트웨어마이스터고등학교 DevFest 특강 - 바이브 코딩 시대에서 주니어 개발자로 살아남는 방법
utilforever
1
150
共通化で考えるべきは、実装より公開する型だった
codeegg
0
270
Featured
See All Featured
Believing is Seeing
oripsolob
1
170
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
180
GitHub's CSS Performance
jonrohan
1033
470k
WCS-LA-2024
lcolladotor
0
740
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
390
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Google's AI Overviews - The New Search
badams
0
1.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
330
Visualization
eitanlees
152
17k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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!