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
はじめてのKenBurnsEffect
Search
Yoichi Nishimura
February 18, 2015
Technology
1
1.4k
はじめてのKenBurnsEffect
第14回 potatotips (iOS/Android開発Tips共有会) での発表資料
Yoichi Nishimura
February 18, 2015
Tweet
Share
More Decks by Yoichi Nishimura
See All by Yoichi Nishimura
Material Designの作り方 〜Bottom Sheets編〜
nissiy
1
680
iQONのWear Notification最適化
nissiy
2
430
iQON Engineer Seminar - Android
nissiy
0
4.1k
Other Decks in Technology
See All in Technology
Building Scalable Backend Services with Firebase
wisdommatt
0
110
WantedlyでのKotlin Multiplatformの導入と課題 / Kotlin Multiplatform Implementation and Challenges at Wantedly
kubode
0
250
あなたの人生も変わるかも?AWS認定2つで始まったウソみたいな話
iwamot
3
860
2024AWSで個人的にアツかったアップデート
nagisa53
1
110
シフトライトなテスト活動を適切に行うことで、無理な開発をせず、過剰にテストせず、顧客をビックリさせないプロダクトを作り上げているお話 #RSGT2025 / Shift Right
nihonbuson
3
2.2k
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
450
今から、 今だからこそ始める Terraform で Azure 管理 / Managing Azure with Terraform: The Perfect Time to Start
nnstt1
0
240
「隙間家具OSS」に至る道/Fujiwara Tech Conference 2025
fujiwara3
7
6.5k
【Oracle Cloud ウェビナー】2025年のセキュリティ脅威を読み解く:リスクに備えるためのレジリエンスとデータ保護
oracle4engineer
PRO
1
100
Visual StudioとかIDE関連小ネタ話
kosmosebi
1
380
AWS re:Invent 2024 re:Cap Taipei (for Developer): New Launches that facilitate Developer Workflow and Continuous Innovation
dwchiang
0
170
2025年に挑戦したいこと
molmolken
0
160
Featured
See All Featured
For a Future-Friendly Web
brad_frost
176
9.5k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7.1k
Docker and Python
trallard
43
3.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Code Reviewing Like a Champion
maltzj
521
39k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Making the Leap to Tech Lead
cromwellryan
133
9k
KATA
mclloyd
29
14k
Designing Experiences People Love
moore
139
23k
Agile that works and the tools we love
rasmusluckow
328
21k
Transcript
͡Ίͯͷ,FO#VSOT&⒎FDU OJTTJZ
"CPVU.F w OJTTJZʢʹͬ͠ʔʣ !ZPJDIJOJTIJNVSB!OJTTJZ w 7"4*-: JOD w J20/࡞͍ͬͯ·͢ w
झຯөըؑ
,FO#VSOT&⒎FDUʁʁʁ
,FO#VSOT&⒎FDU w υΩϡϝϯλϦʔөըͷಜ ,FO#VSOTʢ!LFOCVSOTʣ͕ଟ༻͢Δ ύϯɾνϧτͱζʔϜΛΈ߹Θٕͤͨ๏ w ੩ࢭըʹಈ͖Λ༩͑ΔޮՌ͕͋Γ·͢ w (PPHMF1MBZχϡʔεελϯυͷΞϨ IUUQKBXJLJQFEJBPSHXJLJέϯɾόʔϯζ
,FO#VSOT7JFX࡞Γ·ͨ͠
'SBNF-BZPVUΛܧঝͨ͠$VTUPN7JFX public class KenBurnsView extends FrameLayout { private boolean mDebugLog
= false; private String mDebugTag = “KenBurnsView";
͍͍͢ΠϯλϑΣʔε @InjectView(R.id.ken_burns_effect) KenBurnsView mKenBurnsEffect; private void startKenBurnsEffect(String... urls) { mKenBurnsEffect.setUrls(urls);
} w "DUJWJUZʢ'SBHNFOUʣ͔Β63-PSϦιʔε*%ΛྻͰ͚ͩ͢
͋ͱࣗಈʹΞχϝʔγϣϯ @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); mHandler.removeCallbacks(mAnimationRunnable); } w
ը૾ͷಡΈࠐΈ͕ྃͨ͠ΒΞχϝʔγϣϯ։࢝ w PO%FUBDIFE'SPN8JOEPX ͰΞχϝʔγϣϯऴྃ
Ξχϝʔγϣϯ7JFX1SPQFSUZ"OJNBUPSͰ // Ξχϝʔγϣϯͷॳظঢ়ଶϥϯμϜͰੜ͠ɺ͜ͷલͰઃఆ͢Δ ViewPropertyAnimator animator = view.animate() .translationX(toTranslationX) .translationY(toTranslationY) .scaleX(toScale)
.scaleY(toScale) .setDuration(duration); animator.start(); w ը૾αΠζͱཚΛͬͯ4DBMFͱ5SBOTMBUJPOΛܾఆͤ͞Δ w ͦͷใΛͬͯ7JFX1SPQFSUZ"OJNBUPSͰΞχϝʔγϣϯ
̏ ̎ ը૾ͷݟͤํʢ/ͷ߹ʣ ̍ ࣌ؒͷྲྀΕ ̏ ̎ ̍ ̏ ̎
̍ w ֤ͷը૾ͷBMQIBΛ͍ͬͯ͡ը૾͕ೖΕସΘΔΑ͏ʹݟ͍ͤͯΔ
͜ΕͰ,FO#VSOT7JFX͕࡞ΕΔͰʂ εϚϗΞϓϦʹԶͷ໊͕ڹ͖ΔΜʂ
طʹJ20/Ͱ͍ͬͯ·͢ w J20/ͷϒϥϯυϖʔδͰ࣮ w ֤ϒϥϯυͷϞσϧೖΓը૾͔ΒΛදࣔ ࡱΓͷΈͷϒϥϯυਓؾΞΠςϜͰิర
Γ͍ͨ͜ͱ w େ͖͍ը૾͕͞Εͨࡍͷ00.ରࡦΛೖΕΔ w ը૾ͷऔಘॲཧ͕Πέͯͳ͍ͷͰ͢ w Ξχϝʔγϣϯ։࢝ޙʹ63-PSϦιʔε*%Λ ड͚औΕΔΑ͏ʹͯ͠ಈతʹը૾Λࠩ͠ସ͑ΒΕΔΑ͏ʹ͢Δ w ֎෦ϥΠϒϥϦԽͯ͠ެ։
͍͞͝ʹ w εϚϗΞϓϦʹөըͷٕ๏͕ೖ͞Ε͡Ί͍ͯΔ 48:FBSͳͷͰ++"CSBNTͷϨϯζϑϨΞͱ͔དྷΔ͔X w ,FO#VSOT&⒎FDUΧοί͍͍ʂঁͷࢠ͔Βͷධྑ͍ʂ
͋Γ͕ͱ͏͍͟͝·ͨ͠