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の物理ベースアニメーション
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Takahiro Shimokawa
December 18, 2017
Programming
1
660
Androidの物理ベースアニメーション
SpringAnimationクラスを例に、追加されたPhysics-based Animationの導入を紹介します。
Takahiro Shimokawa
December 18, 2017
Tweet
Share
More Decks by Takahiro Shimokawa
See All by Takahiro Shimokawa
PlayStoreでの新しいユーザー訴求 -LiveOpsの活用とその成果-
androhi
0
2.8k
ConcatAdapterを深掘る
androhi
1
470
Android Studio 4.1推しポイント!
androhi
0
1.4k
一人開発でつまづいたときの処方箋
androhi
0
390
ConstraintLayout再入門
androhi
2
3.5k
Firebase Analytics 使用感
androhi
0
920
Support Library v23.2 overview
androhi
0
730
Support Library 総復習
androhi
2
2.6k
(続)エンジニアのためのSketch3入門
androhi
1
2.9k
Other Decks in Programming
See All in Programming
Agentic AI: Evolution oder Revolution
mobilelarson
PRO
0
190
メッセージングを利用して時間的結合を分離しよう #phperkaigi
kajitack
3
260
Java 21/25 Virtual Threads 소개
debop
0
200
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
150
Claude Code Skill入門
mayahoney
0
410
条件判定に名前、つけてますか? #phperkaigi #c
77web
2
620
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
380
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
[SF Ruby Feb'26] The Silicon Heel
palkan
0
120
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
750
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
230
CSC307 Lecture 15
javiergs
PRO
0
260
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
3
300
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
340
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.5k
We Have a Design System, Now What?
morganepeng
55
8k
Being A Developer After 40
akosma
91
590k
Automating Front-end Workflow
addyosmani
1370
200k
RailsConf 2023
tenderlove
30
1.4k
Visualization
eitanlees
150
17k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
sira's awesome portfolio website redesign presentation
elsirapls
0
200
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.2k
Transcript
AndroidͷཧϕʔεΞχϝʔ γϣϯ Լܟ߂ on potatotips#46 1
Introduction — Twitter/GitHub : @androhi — Android application engineer at
FiNC inc. — https://play.google.com/store/apps/details? id=jp.co.fincapp&hl=ja 2
Android animation — Property Animation — ΦϒδΣΫτͷҐஔେ͖͞ͳͲͷϓϩύςΟΛมԽͤ͞Δ — View Animation
— ΞχϝʔγϣϯΛఆٛͨ͠xmlϑΝΠϧΛ͏ — Drawable Animation — ύϥύϥອը — Physics-based Animation <- Added! — ཧ๏ଇʹԊͬͨϦΞϧͳΞχϝʔγϣϯ 3
Physics-based Animation — APIΨΠυ — https://developer.android.com/guide/topics/ graphics/physics-based-animation.html — Google I/O
2017 video (Android Animations Spring to Life) — https://www.youtube.com/watch?v=BNcODK-Ju0g 4
Physics-based Animation 1. Spring Animation — όωͷྗʹΑΔΞχϝʔγϣϯ 2. Fling Animation
— ॳظͷ͍Λ࣋ͪঃʑʹݮ͢ΔΞχϝʔγϣϯ 5
Spring Animation dependencies { compile "com.android.support:support-dynamic-animation:27.0.2" } ओʹ͜ΕΒͷΫϥεΛ༻͢Δ — SpringAnimation
class — SpringForce class 6
Create spring animation val springAnimation = SpringAnimation(imageView, SpringAnimation.TRANSLATION_X) springAnimation.spring =
SpringForce().apply { // ݮਰΛઃఆ dampingRatio = SpringForce.DAMPING_RATIO_MEDIUM_BOUNCY // ߶ੑΛઃఆ stiffness = SpringForce.STIFFNESS_MEDIUM } springAnimation.start() 7
Demo https://github.com/androhi/ PhysicsBasedAnimationSample 8
Tips: animateToFinalPosition() method ҎԼΛ྆ํॲཧͯ͘͠ΕΔ 1. ࠷ޙͷҐஔΛηοτ — call setFinalPosition() 2.
ΞχϝʔγϣϯΛ։࢝ — call start() 9
Summary — ͜Ε·ͰͷΞχϝʔγϣϯΫϥεͷΑ͏ʹࡉ͔͍ύϥϝʔ λʔΛௐͤͣʹɺϦΞϧͳΞχϝʔγϣϯ͕࣮Ͱ͖ Δɻ — ΦϒδΣΫτಉ࢜ͷ࿈ಈͳͲɺෳࡶͳΞχϝʔγϣϯ࣮ Ͱ͖Δɻ 10
Thank you for listening 11