Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Android Architecture Componentの Navigationで少しは...
Search
bigbackboom
July 23, 2019
Technology
0
650
Android Architecture Componentの Navigationで少しはまった話
bigbackboom
July 23, 2019
Tweet
Share
More Decks by bigbackboom
See All by bigbackboom
JKでもわかるSFace Recognition
bigbackboom
0
52
Androidタブレットアプリ作成_棚から牡丹餅を得るにはまず棚から
bigbackboom
0
42
Proto Datastoreを使う前の心構え
bigbackboom
0
260
Extended A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
18
Have A Dog in CircleCI
bigbackboom
0
51
Androidエンジニアのお仕事でのショボーン
bigbackboom
0
70
解明!楽しいプレゼンする話すスキル
bigbackboom
0
84
Pay for Businessのgradle.ktsへの移行の小噺
bigbackboom
0
57
A Study in Bitmap: Is NDK the fast Processing method by CPU?
bigbackboom
0
290
Other Decks in Technology
See All in Technology
AI駆動開発ライフサイクル(AI-DLC)の始め方
ryansbcho79
0
180
Introduce marp-ai-slide-generator
itarutomy
0
130
半年で、AIゼロ知識から AI中心開発組織の変革担当に至るまで
rfdnxbro
0
140
Bedrock AgentCore Evaluationsで学ぶLLM as a judge入門
shichijoyuhi
2
250
MySQLのSpatial(GIS)機能をもっと充実させたい ~ MyNA望年会2025LT
sakaik
0
120
Strands AgentsとNova 2 SonicでS2Sを実践してみた
yama3133
1
1.9k
AWS re:Invent 2025~初参加の成果と学び~
kubomasataka
0
190
Connection-based OAuthから学ぶOAuth for AI Agents
flatt_security
0
360
アプリにAIを正しく組み込むための アーキテクチャ── 国産LLMの現実と実践
kohju
0
220
20251218_AIを活用した開発生産性向上の全社的な取り組みの進め方について / How to proceed with company-wide initiatives to improve development productivity using AI
yayoi_dd
0
660
AI駆動開発の実践とその未来
eltociear
2
490
Snowflake導入から1年、LayerXのデータ活用の現在 / One Year into Snowflake: How LayerX Uses Data Today
civitaspo
0
2.4k
Featured
See All Featured
Tell your own story through comics
letsgokoyo
0
760
How to make the Groovebox
asonas
2
1.8k
Amusing Abliteration
ianozsvald
0
69
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
680
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
120
We Are The Robots
honzajavorek
0
120
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
49k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.8k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
410
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
Transcript
Android Architecture Componentͷ NavigationͰগ͠·ͬͨ
ࣗݾհ — ٠/bigbackboom — CBcloudגࣜձࣾɹ
Navigationͱʁ — Google I/O 2018Ͱൃද͞ΕͨAndroid Architecture ComponentͷҰͭ — FragmentؒͷભҠΛϘτϜφϏͳͲͰߦ͏ͳͲෳࡶͳཁ݅ ͷͨΊʹ։ൃ͞Εͨɻ
— backstackͷཧ͕͍͠ — fragmentࣗମͷlifecycle͕ෳࡶ — ݟͨiOSͷstoryboardͳͲʹ͍͕ۙɺ༻ൣғ͍ͩ
ͳͥϘτϜφϏͰNavigationΛ͏ඞཁ͕͋Δʁ — Α͘ΘΕ͍ͯͨɺViewPager+BottomNavigationView ׂͱ࣮͕ෳࡶʢ࡞Δύʔπ͕ଟ͍ʣɻ — ViewPagerը໘ͷΩϟογϡॲཧ͕ಈ͘ͷͰɿ — ෳը໘͕ಉ࣌ʹಡΈࠐ·Εɺىಈ͕͘ͳΔ — ΩϟογϡʹΑͬͯɺը໘͕ഁغ͞Εબ࣌ʹҰ͔
ΒಡΈࠐ·ΕΔɻ
BottomNavigationView + NavigationΛ࣮ — ͜ͷrepositoryΛϕʔεʹΘ ͤͯΒ͍·ͨ͠ɻ — ߏӈͷը૾ͷΑ͏ʹͳ͍ͬͯ ·͢ɻ
λϒຖͷঢ়ଶҡ࣋ — Կ͠ͳ͍ͱɺ DashboardFragmentͱ NotificationsFragmentλϒ͕ બ͞ΕΔͨͼʹॳظԽ͞ΕΔ — ͦΕΛආ͚ΔͨΊʹɺ BottomNavigationViewͱ FragmentͷੜΛհ͢Δɺ
FragmentNavigatorΛࣗ࡞͢Δ ඞཁ͕͋Δɻ
— ࢀߟrepositoryͰ KeepStateNavigatorͱ͍͏ͷ Λ࡞͍ͬͯΔɻ — ·ͨɺBottomNavigationViewͱ FragmentͷؔΛఆٛͨ͠ɺ nav_graph.xmlͰ KeepStateNavigatorΛ༻ͯ͠ ͍Δ
ͰɾɾɾԿʹ·ͬͨͷʁ — Activity͔ΒFragmentʹΛ͢͜ͱ͕Ͱ͖ͳ͍ɾɾɾ — ௨ৗͰ͋Ε,ԼهͷΑ͏ʹ͢ΕΛϑϥάϝϯτʹͤ Δɻ val bundle = Bundle().apply
{ putString("NOTIFICATION_KEY", "bigbacbkboom is here") } NavController.navigate(item.itemId, bundle)
͕͔ͩ͠͠ɾɾɾ
null ͩͱɾɾɾ
దʹͨΓΛ͚ͭΔ
KeepStateNavigator෦ͰσόοΨͰࢭΊͯΈΔ — Έ͚ͬͽΐΜ
KeepStateNavigator.kt ίʔυΛमਖ਼ ҎԼͷߦΛҰͭՃ͢Δ͚ͩɻ var fragment = manager.findFragmentByTag(tag) fragment?.arguments = args
if (fragment == null) { val className = destination.className fragment = manager.fragmentFactory.instantiate(context.classLoader, className) transaction.add(containerId, fragment, tag) } else { transaction.attach(fragment) }
मਖ਼༰ʁ — fragmentΛੜ͢Δͱ͖ʹɺBundleΛͯ͋͛͠ΔॲཧΛ ॻ͚͍͍ͱ͍͏ࢸۃ୯७ͳͷͰ͢ɻ — ͨͩɺਓͷίʔυΛૉʹίϐʔͯͨ͠ͷͰɺΓ͜Ε ʹؾ͕ͭ͘ͷʹۤ࿑͠·ͨ͠ɻ
݁ — NavigationViewPage+BottomNavigationViewrΑΓ ύʔπ͕গͳָ͘ɻ — ͲΜͳ͜ͱಉ͡Ͱ͕͢ɺΓͲΜͳ͜ͱͪΌΜͱཧ ղ͠ͳ͍ͱ௧͍ΛݟΔɻ
We are Hiring! — Ұॹʹಇؒ͘Λ୳͍ͯ͠·͢ɻ — αʔϏεࢤͷํ — ੵۃతʹఏҊͯ͠৽͍ٕ͠ज़ͷΤϯδχΞϦϯάΛߦ͍ͨ ͍ํ
— ϚωʔδϝϯτΛ͍ͨ͠ํ https://www.wantedly.com/companies/cb-cloud