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
490
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.1k
Android 14 新機能 / Android 14 Meetup Nagoya
star_zero
1
680
Coroutines Test 入門 / Android Test Night #8
star_zero
2
1.3k
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
620
これからはじめるAndroid開発 / DevFest 2020
star_zero
4
770
Featured
See All Featured
Believing is Seeing
oripsolob
1
170
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
220
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
310
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
920
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
55k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
220
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
220
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
590
Into the Great Unknown - MozCon
thekraken
41
2.6k
Writing Fast Ruby
sferik
630
63k
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
ありがとうございました