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
310
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
88
My Workspace [2020/06版]
umechanhika
0
33
Capture view and Register to gallery
umechanhika
0
45
Shape Design with Material Components
umechanhika
3
220
Firebase MLKit AutoML Vision Edgeを触ってみた
umechanhika
3
510
Google Play Consoleの時間指定公開のハマりポイント
umechanhika
1
1.5k
UIテスト初心者のチームにUIテスト自動化を導入した話
umechanhika
0
110
GoogleI/Oアプリのようなフィルター機能を実装する
umechanhika
2
480
Jenkins + Bitbucketでアプリリリースを自動化してみた
umechanhika
1
610
Other Decks in Programming
See All in Programming
.NET Frameworkでも汎用ホストが使いたい!
tomokusaba
0
200
ML.NETで始める機械学習
ymd65536
0
230
バッチを作らなきゃとなったときに考えること
irof
2
530
Learning Kotlin with detekt
inouehi
1
140
sappoRo.R #12 初心者セッション
kosugitti
0
280
Datadog DBMでなにができる? JDDUG Meetup#7
nealle
0
150
複数のAWSアカウントから横断で 利用する Lambda Authorizer の作り方
tc3jp
0
120
Introduction to kotlinx.rpc
arawn
0
770
新宿駅構内を三人称視点で探索してみる
satoshi7190
2
120
Rubyで始める関数型ドメインモデリング
shogo_tksk
0
140
PRレビューのお供にDanger
stoticdev
1
230
Rails アプリ地図考 Flush Cut
makicamel
1
130
Featured
See All Featured
Building an army of robots
kneath
303
45k
Music & Morning Musume
bryan
46
6.4k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Producing Creativity
orderedlist
PRO
344
40k
We Have a Design System, Now What?
morganepeng
51
7.4k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
6
260
Imperfection Machines: The Place of Print at Facebook
scottboms
267
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!