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
Android Jetpack: Navigationを使ってみる
Search
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
960
Create Layouts with the Wearable UI Library
teshi04
2
4.8k
Other Decks in Technology
See All in Technology
顧客価値を追いかけたら、プライシングにたどり着いた
sansantech
PRO
2
1k
「私が一番顧客に詳しい」を捨てる~ 全員が一次情報に精通する開発チームをつくり、PMが次のボトルネックへ染み出すまで
kaminashi
4
2.5k
AIで選択肢が広がった組織設計の理想と現実
konifar
13
5.5k
Devin プロモコードの受け取りと適用(2026.10.27)
kinopeee
0
530
「Learning Outcome」を書きたくない私が、Learning Outcomeと折り合いをつけるまで
mhlyc
0
240
企画を Software Factory-ready にする——開発が高速になったとき、PdMの仕事はどう変わったか
yachibit
1
270
スクラム祭り2026福井トラック_閉じたループから価値のスパイラルへ
kc_nakanishi
0
170
アカウント統制の健康診断
kenichinakamura
1
200
1週間、Opus封印でお願いします
kintotechdev
0
190
Maestro MCPとClaude Code Skillsによる自律的なE2Eテスト支援
asmz
0
130
AWSDirectConnectの構築の進め方を整理してみた
masa_my
1
200
AWS Continuum for Penetration Testing に Deep Dive してみる
asanoharuki
1
1.4k
Featured
See All Featured
Side Projects
sachag
456
43k
The SEO identity crisis: Don't let AI make you average
varn
0
610
Statistics for Hackers
jakevdp
799
230k
Raft: Consensus for Rubyists
vanstee
143
7.8k
The agentic SEO stack - context over prompts
schlessera
0
980
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
460
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.3k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
640
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
It's Worth the Effort
3n
188
29k
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!