Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
ViewFlipperで手軽にリッチアニメーション
Search
Wataru Mizukami
March 08, 2019
Technology
620
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ViewFlipperで手軽にリッチアニメーション
Wataru Mizukami
March 08, 2019
More Decks by Wataru Mizukami
See All by Wataru Mizukami
GitHub Actions活用術
tarumzu
1
830
CIサービス「Bitrise」を使って 最小限の労力でDanger + ktlintをGithubと連携させる
tarumzu
1
1.1k
JavaScriptでWebViewをハックする
tarumzu
2
1.5k
Realm Cloudを使ったオフラインファーストなアプリ開発
tarumzu
2
1.1k
Kotlin serializationの使い方を詳しく調べてみた
tarumzu
2
1.7k
Other Decks in Technology
See All in Technology
go-sqletch
moznion
0
140
USB PDを使ってスマホを労わりたい
raspython3
0
160
不可逆な意思決定を避けながら10億超の顧客データを AI Ready にするデータ基盤設計
baseballyama
1
310
会社説明資料
persolserverworks
0
9.7k
味覇で作るパスタが美味い - 20261001_yabaubuki.dev
livesense
PRO
0
130
組み立てて楽しむ AWS Blocks 入門
kmiya84377
0
230
使いこなすために知っておきたい Azure SRE Agent アンチパターン
torumakabe
2
480
実践!Cloud Run ハンズオン!! / Cloud Run handson
y0hgi
0
230
AI時代だからこそ推したい!Gitコマンド再入門
munakata
0
180
More Freedom on the Same Shared GPU Cluster: A Small Team’s Experience with vCluster
nttcom
0
160
AI 時代の Azure エンジニアリング ~ 私たちは何を磨き、何を任せるのか ~
chack411
1
590
SREでアラート疲れを 解決しよう!
kairim0
1
230
Featured
See All Featured
So, you think you're a good person
axbom
PRO
2
2.2k
Typedesign – Prime Four
hannesfritz
42
3.2k
Writing Fast Ruby
sferik
630
63k
Between Models and Reality
mayunak
4
490
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
560
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Prompt Engineering for Job Search
mfonobong
0
500
Transcript
ViewFlipperで 手軽にリッチアニメーション Wataru Mizukami(水上 亘)
自己紹介 Wataru Mizukami/水上 亘 / @tarumzu (たる) Organization/ sikmi,
inc.
ViewFlipperとは - 子ViewやLayoutの表示を手軽に切り替えられるwidget - 親クラスはViewAnimatorなので簡易的なアニメーションしか 出来ない
AdapterViewFlipperとは - 親クラスはAdapterViewAnimator。ObjectAnimatorを利用 できるため、リッチなアニメーションを実装可能 - 子ViewやLayoutを切り替えるにはAdapterを作成する必要が あるため、実装が大変
ViewFlipperで楽しながらリッチなアニ メーションは出来ないのか? Androidは険しい道程しかないの か!?
実は出来ます 自分のような初心者だとWidgetでサ ポートされていないアニメーションは使 えないと思いがち(ですよね? )
val outRotationY = ObjectAnimator.ofFloat(flipper, "rotationY", 0f, 90f) val inRotationY =
ObjectAnimator.ofFloat(flipper, "rotationY", 270f, 360f) outRotationY.addListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator?) { inRotationY.start() flipper.showNext() } }) flipper.setOnClickListener { outRotationY.start() }
val outRotationY = ObjectAnimator.ofFloat(flipper, "rotationY", 0f, 90f) val inRotationY =
ObjectAnimator.ofFloat(flipper, "rotationY", 270f, 360f) outRotationY.addListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator?) { inRotationY.start() flipper.showNext() } }) flipper.setOnClickListener { outRotationY.start() } 消えるときのアニメーション
val outRotationY = ObjectAnimator.ofFloat(flipper, "rotationY", 0f, 90f) val inRotationY =
ObjectAnimator.ofFloat(flipper, "rotationY", 270f, 360f) outRotationY.addListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator?) { inRotationY.start() flipper.showNext() } }) flipper.setOnClickListener { outRotationY.start() } 現れるときのアニメーション
val outRotationY = ObjectAnimator.ofFloat(flipper, "rotationY", 0f, 90f) val inRotationY =
ObjectAnimator.ofFloat(flipper, "rotationY", 270f, 360f) outRotationY.addListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator?) { inRotationY.start() flipper.showNext() } }) flipper.setOnClickListener { outRotationY.start() } 消えるアニメーションが終了したタイミン グで現れるアニメーションを実行
val outRotationY = ObjectAnimator.ofFloat(flipper, "rotationY", 0f, 90f) val inRotationY =
ObjectAnimator.ofFloat(flipper, "rotationY", 270f, 360f) outRotationY.addListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator?) { inRotationY.start() flipper.showNext() } }) flipper.setOnClickListener { outRotationY.start() } ViewFlipperの裏面レイアウトの表示 を行う
val outRotationY = ObjectAnimator.ofFloat(flipper, "rotationY", 0f, 90f) val inRotationY =
ObjectAnimator.ofFloat(flipper, "rotationY", 270f, 360f) outRotationY.addListener(object : AnimatorListenerAdapter() { override fun onAnimationEnd(animation: Animator?) { inRotationY.start() flipper.showNext() } }) flipper.setOnClickListener { outRotationY.start() } flipperをタップしたら消えるアニ メーションを実行する
実演はQiitaにて! https://qiita.com/tarumzu/items/3d58f072e6b273caa496
まとめ - 先入観に囚われない - ViewFlipperのアニメーションは一切使わずにいいところだけ を使い、ObjectAnimatorにすべてを任せる
ご清聴、ありがとうございました!