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 14 と Predictive back gesture / Shibuya...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
star_zero
May 26, 2023
500
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Android 14 と Predictive back gesture / Shibuya.apk #42
star_zero
May 26, 2023
More Decks by star_zero
See All by star_zero
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1.6k
Jetpack Compose の Side-effect を使いこなす / DroidKaigi 2023
star_zero
5
7.2k
Android 14 新機能 / Android 14 Meetup Nagoya
star_zero
1
690
Coroutines Test 入門 / Android Test Night #8
star_zero
2
1.4k
What's new in Jetpack / I/O Extended Japan 2022
star_zero
1
710
Kotlin 2021 Recap / DevFest 2021
star_zero
3
1.4k
Kotlin Symbol Processing (KSP) を使ったコード生成 / DroidKaigi 2021
star_zero
2
5.3k
What's new Android 12
star_zero
0
630
これからはじめるAndroid開発 / DevFest 2020
star_zero
4
780
Featured
See All Featured
Deep Space Network (abreviated)
tonyrice
0
250
Java REST API Framework Comparison - PWX 2021
mraible
34
9.6k
A Tale of Four Properties
chriscoyier
163
24k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
760
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
Everyday Curiosity
cassininazir
0
270
The Invisible Side of Design
smashingmag
301
52k
Amusing Abliteration
ianozsvald
1
240
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
320
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
460
Transcript
@STAR_ZERO Shibuya.apk #42 2023/05/26 Android 14 と Predictive back gesture
https://developer.android.com/guide/navigation/predictive-back-gesture
• Android 13で導入 • ホームに戻ることが予測できるようなアニメーション • Opt-inが必要 • 端末の開発者向けオプションで設定が必要 •
AndroidXライブラリの使用が推奨 ◦ KEYCODE_BACK と onBackPressed は使用しない Predictive back gesture
• アプリ全体でのOpt-inではなく、Activity単位で可能に • Activity間のアニメーション • 新しいAPIが追加され、カスタムアニメーションが可能に • 一部 Material Component
が対応 Android 14での新機能
Activity単位のOpt-in <manifest> <application <activity android:name=".MainActivity"> <!-- ... --> </activity> <!--
このActivityだけ Predicitive back gesture を有効にする --> <activity android:name=".SampleActivity" android:enableOnBackInvokedCallback="true" /> </application> </manifest>
Activity間のアニメーション https://developer.android.com/about/versions/14/features/predictive-back
新しいAPI (androidx.activity 1.8.0-alpha01 から) val callback = object : OnBackPressedCallback(true)
{ override fun handleOnBackPressed() { } override fun handleOnBackProgressed(backEvent: BackEvent) { // gestureの進捗 } override fun handleOnBackCancelled() { // キャンセルされたとき } override fun handleOnBackStarted(backEvent: BackEvent) { // gestureが始まったとき } }
Material Component対応 (Viewシステム)
• https://developer.android.com/guide/navigation/predictive-ba ck-gesture • https://developer.android.com/about/versions/14/features/pre dictive-back • https://github.com/material-components/material-componen ts-android/blob/master/docs/foundations/PredictiveBack.md Appendix
ありがとうございました