Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Badging for Tabs and Bottom Navigation
Search
umechanhika
February 12, 2020
Programming
420
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
Transcript
15 slides
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!
More Decks by umechanhika
See All by umechanhika
My Workspace [2020/08版]
umechanhika
0
120
My Workspace [2020/06版]
umechanhika
0
65
Capture view and Register to gallery
umechanhika
0
89
Shape Design with Material Components
umechanhika
3
290
Firebase MLKit AutoML Vision Edgeを触ってみた
umechanhika
3
610
Google Play Consoleの時間指定公開のハマりポイント
umechanhika
1
1.7k
UIテスト初心者のチームにUIテスト自動化を導入した話
umechanhika
0
130
GoogleI/Oアプリのようなフィルター機能を実装する
umechanhika
2
560
Jenkins + Bitbucketでアプリリリースを自動化してみた
umechanhika
1
720
Other Decks in Programming
See All in Programming
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
1.4k
joyful-journey-spring-boot.pdf
hollycummins
0
150
Agentic AI with the Power of Jakarta EE
ivargrimstad
0
250
Apache Airflow Introduction
leew
1
100
Debian JP Projectのサーバー構成
uwabami
1
190
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
280
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
880
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
530
SODA - FACT BOOK(JP)
sodainc
1
40k
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
610
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
620
LLM 101
dalinaum
0
560
Featured
See All Featured
Embracing the Ebb and Flow
colly
88
5.2k
Designing Experiences People Love
moore
143
24k
Statistics for Hackers
jakevdp
799
230k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.5k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.3k
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
710
Utilizing Notion as your number one productivity tool
mfonobong
4
710
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
580
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
510
Designing for humans not robots
tammielis
254
26k