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
86
Shape Design with Material Components
umechanhika
3
280
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
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
17
9.5k
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
470
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
260
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.2k
Kawaiicon: Kubernetes, it's no longer cool, but let's secure it anyway!
barnbarn
0
140
AI Augmentation Techniques with Liberty
ivargrimstad
1
560
How SRE Grew Out of Server-Side Work and Became the Team's Own / サーバサイドから始まったSREを チームに渡すまで
maaaato
0
180
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
350
AI駆動開発4年目の現在地(『あなたはFDEになるべきか?』イベント資料)
kumaiu
0
690
SODA - FACT BOOK(JP)
sodainc
1
40k
Spec-driven Development with AI
simas
PRO
0
2.3k
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
610
Featured
See All Featured
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
780
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
For a Future-Friendly Web
brad_frost
184
11k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
A Tale of Four Properties
chriscoyier
163
24k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
470
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
70
69k
Navigating Team Friction
lara
192
16k