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
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
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
RailsConf 2023
tenderlove
30
1.5k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.3k
Practical Orchestrator
shlominoach
191
11k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
3.5k
KATA
mclloyd
PRO
35
15k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
630
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
200
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
200
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
ありがとうございました