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
Youtube like BottomNavigation
Search
kobito-kaba
July 01, 2022
Technology
270
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Youtube like BottomNavigation
kobito-kaba
July 01, 2022
More Decks by kobito-kaba
See All by kobito-kaba
新規プロジェクトでやってよかったことまとめ
kobitokaba
1
920
Modularizing and Refactoring Android App with Clean Architecture
kobitokaba
0
300
Slice Your App
kobitokaba
2
1.3k
Inside Jetpack
kobitokaba
2
170
Generating and Transforming Kotlin code
kobitokaba
0
140
Conference Tourism
kobitokaba
0
290
Inside Jetpack Architecture Components
kobitokaba
0
250
Kotlinもう一歩
kobitokaba
8
17k
Inside LifecycleObserver
kobitokaba
0
140
Other Decks in Technology
See All in Technology
あなたの『Site』はどこですか? — xREという考え方
miyamu
0
1.2k
GoでCコンパイラを作った話
repunit
0
110
2年前に削除したPHPクラスが、 ある日突然決済をエラーにした
ykagano
1
290
Amplify Gen2でbackend.tsにCDKを定義する/しない事によるCDKの挙動の違いとユースケース
smt7174
1
420
変更し続けられるシステムをどう保つか — AI時代のSSoTという設計原則
kawauso
0
130
DatabricksにおけるMCPソリューション
taka_aki
1
280
Data + AI Summit 2026 イベントレポート: 「AIがビジネスで意思決定するデータ基盤」へ
nek0128
0
280
Making sense of Google’s agentic dev tools
glaforge
1
280
生成AI×AWS CDK×AWS FISで"振り返れる"ミニGameDayをつくろう
yoshimi0227
1
400
アップデートで何が変わった?デモで学んで使いこなすIBM Bob2.0
muehara
0
130
個人開発で育てる「大規模設計の苗床」 - AI時代の1人開発から始める業務への知識接続 / The Seedbed for Large-Scale Design - From AI-Era Solo Projects to Professional Knowledge
bitkey
PRO
1
280
AIが実装を自走する時代の認知負債との戦い
lycorptech_jp
PRO
1
310
Featured
See All Featured
Into the Great Unknown - MozCon
thekraken
41
2.6k
Technical Leadership for Architectural Decision Making
baasie
3
440
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
180
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
210
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
630
Faster Mobile Websites
deanohume
310
32k
Code Reviewing Like a Champion
maltzj
528
40k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
The Cult of Friendly URLs
andyhume
79
6.9k
Transcript
Hiroyuki Mori @moridroid BottomNavigationView for humankind
↓This
making a new app
making a new app - multi-module project
making a new app - multi-module project - Jetpack Navigation
making a new app - multi-module project - Jetpack Navigation
- BottomNavigationView
making a new app - multi-module project - Jetpack Navigation
- BottomNavigationView →
making a new app - multi-module project - Jetpack Navigation
- BottomNavigationView →
No support for Multiple Backstack
https://bit.ly/3wXjGLy
Click
None
Click
None
Click QUIZ: When the Home menu is clicked, which screen
is displayed? 1. Welcome 2. About
None
disappear go down
No!
Behavior Changed support multiple backstack from Fragment 1.4.0-alpha01 NavigationUI 2.4.0-alpha01
Just update dependencies
This isn’t nice
Click
Click
Click
None
This isn’t nice
This isn’t nice
QUIZ: If you click the back key, which screen is
displayed? 1. Welcome 2. About Click
QUIZ: If you click the back key, which screen is
displayed? 1. Welcome 2. About Click ?
QUIZ: If you click the back key, which screen is
displayed? 1. Welcome 2. About Click ✕
None
Click
None
How Multiple backstack works
Backstack SavedState
Backstack SavedState Click
Backstack SavedState menu A Save Backstack SavedState Click
Backstack SavedState menu A Click
Backstack SavedState menu B menu A Restore Save Click
Backstack SavedState menu A menu B ← When the back
key is pressed ← Can’t decide which should be restored
Backstack SavedState menu A menu B ← New Instance Backstack
SavedState menu A menu B
Backstack SavedState menu A menu B menu A menu B
Click
menu B menu A Backstack SavedState menu B Backstack SavedState
graph A1 B1 C1 D1 B2 B3 C2 C3 D2
D3 C4 C5
graph A1 B1 C1 D1 B2 B3 C2 C3 D2
D3 C4 C5
graph A1 B1 C1 D1 B2 B3 C2 C3 D2
D3 C4 C5
graph A1 B1 C1 D1 B2 B3 C2 C3 D2
D3 C4 C5
graph A1 B1 C1 D1 B2 B3 C2 C3 D2
D3 C4 C5
graph A1 B1 C1 D1 B2 B3 C2 C3 D2
D3 C4 C5
What the ideal Bottom Navigation should be
None
None
C1
C1 C2
C1 C2 C3
C1 C2 C3 D1 Click menu D
C1 C2 C3 D1 D2 Click menu D
C1 C2 C3 D1 D2 Click menu D Click menu
C
C1 C2 C3 D1 D2 Click menu D Click menu
C Then, the back key will navigate… ① ② ③ ④ ⑤ ⑥ C3 C3 C2 D2 D1 C3 C2 C1 C1 D2 D1 ⑥ ⑤ ④ ③ ② ① ② ③ ① ⑤ ④
How to implement Backstack management
https://bit.ly/3zdDxrn
First of all: Reorderable Stack
class NavStack @Inject constructor(){ data class NavRecord(val screenId: Int, val
menuId: Int) private val selectedMenu = MutableStateFlow(R.id.none) fun push(screenId: Int, menuId: Int) { ... } fun pop(): NavRecord? { ... } fun peekAt(index: Int) : NavRecord? { ... } val size: Int get() { … } fun findByMenuId(menuId: Int): List<NavRecord> { ... } fun moveToTop(menuId: Int) { ... } fun removeAll(menuId: Int) { ... } }
• Navigate • Switch menu • Go Back
Navigate Switch menu Go Back if (currentMenuId == nextMenuId) {
stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments) } else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) }
Navigate case 1: within the same menu if (currentMenuId ==
nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments) } else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) }
if (currentMenuId == nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments)
} else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) } Navigate case 2: across menus
Navigate case 1: within the same menu if (currentMenuId ==
nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments) } else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) }
Navigate case 1: within the same menu if (currentMenuId ==
nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments) } else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) }
Navigate case 1: within the same menu if (currentMenuId ==
nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments) } else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) } fragmentManager.commit { setReorderingAllowed(true) replace(requireNotNull(containerId), clazz.newInstance().apply { arguments = args }) addToBackStack(menuId.toString()) }
Navigate case 1: within the same menu if (currentMenuId ==
nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments) } else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) } fragmentManager.commit { setReorderingAllowed(true) replace(requireNotNull(containerId), clazz.newInstance().apply { arguments = args }) addToBackStack(menuId.toString()) }
if (currentMenuId == nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments)
} else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) } Navigate case 2: across menus
if (currentMenuId == nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments)
} else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) } Navigate case 2: across menus
if (currentMenuId == nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments)
} else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) } Navigate case 2: across menus
if (currentMenuId == nextMenuId) { stack.push(screenId, currentMenuId) fragmentManager.replace(currentMenuId, nextScreen.clazz, arguments)
} else { stack.moveToTop(nextMenuId) stack.push(screenId, nextMenuId) fragmentManager.saveBackStack(currentMenuId.toString()) fragmentManager.restoreBackStack(nextMenuId.toString()) fragmentManager.replace(nextMenuId, nextScreen.clazz, arguments) } Navigate case 2: across menus
Navigate Switch menu Go Back when { currentMenu.menuId == nextMenu.menuId
-> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 1: re-select menu when { currentMenu.menuId ==
nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 2: has no records when { currentMenu.menuId
== nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 3: click the same menu when {
currentMenu.menuId == nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 1: re-select menu when { currentMenu.menuId ==
nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 1: re-select menu when { currentMenu.menuId ==
nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 1: re-select menu when { currentMenu.menuId ==
nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 2: has no records when { currentMenu.menuId
== nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 2: has no records when { currentMenu.menuId
== nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 2: has no records when { currentMenu.menuId
== nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 3: click the same menu when {
currentMenu.menuId == nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 3: click the same menu when {
currentMenu.menuId == nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Switch Menu case 3: click the same menu when {
currentMenu.menuId == nextMenu.menuId -> { stack.removeAll(currentMenu.menuId) stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.clearBackStack(nextMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } stack.findByMenuId(nextMenu.menuId).isEmpty() -> { stack.push(startScreen.screenId, nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.replace(nextMenu.menuId, startScreen.clazz) } else -> { stack.moveToTop(nextMenu.menuId) fragmentManager.saveBackStack(currentMenu.menuId.toString()) fragmentManager.restoreBackStack(nextMenu.menuId.toString()) } }
Navigate Switch menu Go Back when { destRecord == null
&& currentMenuId == graph.startMenuId -> { activity.finish() } destRecord == null -> { stack.push(startScreen.screenId, graph.startMenuId) fragmentManager.replace(graph.startMenuId, startScreen.clazz) } destRecord.menuId == currentMenuId -> { stack.pop() fragmentManager.popBackStack() } else -> { stack.pop() fragmentManager.popBackStack() fragmentManager.restoreBackStack(destRecord.menuId.toString()) } }
Go Back case 1: can’t back at default menu when
{ destRecord == null && currentMenuId == graph.startMenuId -> { activity.finish() } destRecord == null -> { stack.push(startScreen.screenId, graph.startMenuId) fragmentManager.replace(graph.startMenuId, startScreen.clazz) } destRecord.menuId == currentMenuId -> { stack.pop() fragmentManager.popBackStack() } else -> { stack.pop() fragmentManager.popBackStack() fragmentManager.restoreBackStack(destRecord.menuId.toString()) } }
Go Back case 2: can’t back at not default menu
when { destRecord == null && currentMenuId == graph.startMenuId -> { activity.finish() } destRecord == null -> { stack.push(startScreen.screenId, graph.startMenuId) fragmentManager.replace(graph.startMenuId, startScreen.clazz) } destRecord.menuId == currentMenuId -> { stack.pop() fragmentManager.popBackStack() } else -> { stack.pop() fragmentManager.popBackStack() fragmentManager.restoreBackStack(destRecord.menuId.toString()) } }
Go Back case 3: navigate back inside the same menu
when { destRecord == null && currentMenuId == graph.startMenuId -> { activity.finish() } destRecord == null -> { stack.push(startScreen.screenId, graph.startMenuId) fragmentManager.replace(graph.startMenuId, startScreen.clazz) } destRecord.menuId == currentMenuId -> { stack.pop() fragmentManager.popBackStack() } else -> { stack.pop() fragmentManager.popBackStack() fragmentManager.restoreBackStack(destRecord.menuId.toString()) } }
Go Back case 4: navigate back across menus when {
destRecord == null && currentMenuId == graph.startMenuId -> { activity.finish() } destRecord == null -> { stack.push(startScreen.screenId, graph.startMenuId) fragmentManager.replace(graph.startMenuId, startScreen.clazz) } destRecord.menuId == currentMenuId -> { stack.pop() fragmentManager.popBackStack() } else -> { stack.pop() fragmentManager.popBackStack() fragmentManager.restoreBackStack(destRecord.menuId.toString()) } }
in Summary: - Fragment supports Multiple Backstack - BottomNavigationView works
weirdly - You can make it by yourself - I don’t want to make it
in Summary: - Fragment supports Multiple Backstack - BottomNavigationView works
weirdly - You can make it by yourself - I don’t want to make it
in Summary: - Fragment supports Multiple Backstack - BottomNavigationView works
weirdly - You can make it by yourself - I don’t want to make it
in Summary: - Fragment supports Multiple Backstack - BottomNavigationView works
weirdly - You can make it by yourself - I don’t want to make it
in Summary: - Fragment supports Multiple Backstack - BottomNavigationView works
weirdly - You can make it by yourself - I don’t want to make it
Hiroyuki Mori @moridroid Thank you