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
Android Jetpack: Navigationを使ってみる
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yui Matsuura
May 17, 2018
Technology
4.4k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Android Jetpack: Navigationを使ってみる
Yui Matsuura
May 17, 2018
More Decks by Yui Matsuura
See All by Yui Matsuura
★2.2のアプリがIn-App Review APIを導入して★4.2になるまで
teshi04
6
3.8k
Firebase AutoMLのオンデバイス実行とCameraXを組み合わせた新しい価値を秒で試す
teshi04
3
1.1k
技術書典アプリを作った話
teshi04
2
950
Create Layouts with the Wearable UI Library
teshi04
2
4.7k
Other Decks in Technology
See All in Technology
AIコード生成×サプライチェーン攻撃 — PHPが直面する“二重の信頼問題
shinyasaita
0
140
アカウントが増えてからでは遅い? ~ マルチアカウント統制の勘所 ~
kenichinakamura
0
240
人を動かすのは時間ではなく、納得感 〜新任EMが入社3ヶ月、組織を2回変えた話〜
kakehashi
PRO
3
260
世界、断片、モデル。そして理解
ardbeg1958
1
120
DMM.com 購入改善推進チーム におけるCodeRabbitを用いた レビューフロー改善の一例
ysknsid25
2
640
ruby.wasmとPicoRuby.wasmに対応した仮想DOMライブラリを作ってる話 #kaigieffect_kaigi
sue445
PRO
0
150
AI、CDK と協働する Full TypeScript アプリケーション開発 / Full TypeScript Application with AI and CDK
geekplus_tech
2
250
DatabricksにおけるMCPソリューション
taka_aki
1
260
kintone の AI コワーカーを、 Anthropic にエージェントを"ホストさせて"作った話 #devkinmeetup
sugimomoto
0
110
AIと共生する開発者プラットフォーム:バクラクのモノレポ×マイクロサービス基盤
sakajunquality
2
3.6k
大量データに対しても、生成AIを用いてリーズナブルにデータ加工をしたい!Databricksのai_queryについて調べてみた
kamoshika
1
190
個人開発で育てる「大規模設計の苗床」 - AI時代の1人開発から始める業務への知識接続 / The Seedbed for Large-Scale Design - From AI-Era Solo Projects to Professional Knowledge
bitkey
PRO
1
270
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
340
The World Runs on Bad Software
bkeepers
PRO
72
12k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Rails Girls Zürich Keynote
gr2m
96
14k
YesSQL, Process and Tooling at Scale
rocio
174
15k
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
240
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
190
Making the Leap to Tech Lead
cromwellryan
135
10k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
150
Building AI with AI
inesmontani
PRO
1
1.1k
Context Engineering - Making Every Token Count
addyosmani
9
1k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
Transcript
Android Jetpack: Navigationを使っ てみる Google I/O 2018 わいわい報告会 @teshi04
About me てし @teshi04 Yui Matuura Mercari/Marpay
Android Jetpack
Jetpack: Architecture • Databinding • Lifecycles • LiveData • Navigation
new! • Paging new! • Room • ViewModel • WorkManager new!
デモ
None
Navigationの課題 • Fragment Transition • Passing Arguments • Deep Links
• Up and Back • Testing • Error-prone Boilerplate
Architecture: Navigation ビジュアルツールとXML • Navigation Actions • Arguments • Animation
• Up behavior • Deep Link no more Fragment Transaction!
Gradle Dependency allprojects { repositories { google() jcenter() } }
implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha01' implementation 'android.arch.navigation:navigation-ui:1.0.0-alpha01'
NavHostFragmentを追加 activity_main.xml <fragment android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/my_nav_host_fragment" android:name="androidx.navigation.fragment.NavHostFragment" app:navGraph="@navigation/mobile_navigation" app:defaultNavHost="true" />
Navigation Graph
Actionを設定する
Actionを設定する
Navigation Graph(XML) mobile_navigation.xml <navigation xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" app:startDestination="@+id/launcher_home"> <fragment android:id="@+id/launcher_home"
android:name="com.example.android.codelabs.navigation.MainFragment" android:label="@string/home" tools:layout="@layout/main_fragment"> <action android:id="@+id/next_action" app:destination="@id/flow_step_one" ... app:popExitAnim="@anim/slide_out_right" /> </fragment> <fragment android:id="@+id/flow_step_one" android:name="com.example.android.codelabs.navigation.FlowStepFragment" tools:layout="@layout/flow_step_one_fragment"/> ...
NavControllerで遷移する MainFragment.kt transactionsButton.setOnClickListener { view -> Navigation.findNavController(view).navigate(R.id.next_action) }
まとめ • Android Jetpack: Navigationのメリット ◦ 画面遷移が可視化できる ◦ FragmentTransition, Animationが簡単とか
• Jetpack。手段の一つでしかない。使うか使わないかは アプリの次第だと思う
参考リンク • 「Android Jetpack: manage UI navigation with Navigation Controller
(Google I/O '18) https://www.youtube.com/watch?v=8GCXtCjtg40 • Sample https://github.com/googlesamples/android-architecture-c omponents/tree/master/NavigationBasicSample • Navigation Codelab https://codelabs.developers.google.com/codelabs/androi d-navigation/index.html • ドキュメント https://developer.android.com/topic/libraries/architecture/ navigation/
Thanks!