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
A better future with KSS
kneath
240
18k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Technical Leadership for Architectural Decision Making
baasie
3
420
The SEO identity crisis: Don't let AI make you average
varn
0
490
Side Projects
sachag
455
43k
Being A Developer After 40
akosma
91
590k
Typedesign – Prime Four
hannesfritz
42
3.1k
Six Lessons from altMBA
skipperchong
29
4.3k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
Are puppies a ranking factor?
jonoalderson
1
3.6k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Ruling the World: When Life Gets Gamed
codingconduct
0
260
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
ありがとうございました