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
今さら角丸のTransition
Search
magiepooh
September 27, 2019
Programming
1.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
今さら角丸のTransition
Rounded Image Transition
magiepooh
September 27, 2019
More Decks by magiepooh
See All by magiepooh
Google I/O Extended Tokyo 2018
magiepooh
2
1.7k
APIのデータのマッピングを 約18倍速くした話
magiepooh
2
1.1k
まだAPI定義管理で消耗してるの?〜Swaggerを用いた大規模アプリ時代のAPI定義管理とコードジェネレート〜
magiepooh
38
19k
RootBeer
magiepooh
0
890
Customize Error Message
magiepooh
0
920
Kotlin入門
magiepooh
2
1.9k
Adjust Full Screen
magiepooh
2
570
How to get size of NavigationBar and StatusBar
magiepooh
1
1.8k
How to detect phone call
magiepooh
0
1.9k
Other Decks in Programming
See All in Programming
仕様書を書く前にハーネスを作る - Agent Native開発は「探索を速く、判定を固く」
gotalab555
5
1.8k
Japan Community Day at Kubecon + CloudNativeCon Japan 2026: Learning Container Privilege Control by Building My Own Low-Level Container Runtime
ternbusty
1
180
in-process GraphQL のすすめ #ginzajs
izumin5210
4
1.5k
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
590
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
570
Detecting Compromised CI with eBPF and Cilium Tetragon
lizrice
0
270
Dockerfile CMD for Node.js
grazie1999
0
150
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
550
承認済みなのに差戻しできてしまうバグ、型で潰せます
shinchit
0
120
「つくるAI」だけではバグは見つからない ~テストに必要な「見つけるAI」を分離させる戦略~
mfunaki
0
200
進化を続けるGo toolsの現在地 / The Current State of Ever-Evolving Go Tools
hond0413
0
280
ソフトウェアエンジニアにとっての生成AI - 特性を知って使い倒す / generative ai for software enginner
kishida
7
2.2k
Featured
See All Featured
The browser strikes back
jonoalderson
0
1.6k
Typedesign – Prime Four
hannesfritz
42
3.1k
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
420
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
Utilizing Notion as your number one productivity tool
mfonobong
4
560
Are puppies a ranking factor?
jonoalderson
2
3.9k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Building the Perfect Custom Keyboard
takai
2
850
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Transcript
今さら⾓丸画像のTransition 2019/09/27
• ふじたく @magie_pooh • Androider • ⾁、酒、マジック、催眠術、T シャツ作り(とんぼやーじゅ) ⾃⼰紹介
今さら⾓丸画像のTransition 2019/09/27
None
おかわりいただけただろうか? もう⼀度ごはんいただこう
⾓がピコンってなってるのを どうにかしたいッ・・・!
None
1. ⾓丸のImageViewを作る 2. 遷移元、遷移先で⾓丸のImageViewを使う 3. Transitionしながら⾓丸を調整する 対応⽅法(特殊ですがこの⽅法でやりたいのです)
⾓丸のImageViewを作る
省略 CardViewの内部で使われている RoundRectDrawableを使うと作りやすいよ。 コードは以下に置いてます。 https://github.com/magiepooh/ImageTransitionSample
<com.github.magiepooh.imagetransitionsample.RoundedImageView android:id="@+id/image1" android:layout_width="0dp" android:layout_height="0dp" app:flo_top_left_radius="@dimen/radius_card" app:flo_top_right_radius="@dimen/radius_card" android:src="@drawable/mountain" app:layout_constraintDimensionRatio="H,400:267" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
遷移元、遷移先で⾓丸の ImageViewを使う
<com.github.magiepooh.imagetransitionsample.RoundedImageView android:id="@+id/image1" android:layout_width="0dp" android:layout_height="0dp" app:flo_top_left_radius="@dimen/radius_card" app:flo_top_right_radius="@dimen/radius_card" android:src="@drawable/mountain" app:layout_constraintDimensionRatio="H,400:267" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" /> <com.github.magiepooh.imagetransitionsample.RoundedImageView android:id="@+id/header" android:layout_width="0dp" android:layout_height="0dp" android:src="@drawable/mountain" app:flo_top_left_radius="@dimen/radius_card" app:flo_top_right_radius="@dimen/radius_card" app:layout_constraintDimensionRatio="H,400:267" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" /> ؙ͓֯ͳ͡ʹ͓ͯ͘͠
Transitionしながら ⾓丸を調整する
<transitionSet xmlns:android="http://schemas.android.com/apk/res/android"> <changeBounds/> <changeTransform/> <changeClipBounds/> <changeImageTransform/> </transitionSet> IUUQTHJUIVCDPNBPTQNJSSPSQMBUGPSN@GSBNFXPSLT@CBTFCMPCMPMMJQPQSFMFBTFDPSFSFTSFTUSBOTJUJPONPWFYNM
// DetailActivity.kt (ભҠઌͷActivity window.sharedElementEnterTransition = RoundedImageTransitionSet() // RoundedImageTransitionSet.kt class
RoundedImageTransitionSet : TransitionSet() { init { addTransition(ChangeBounds()) addTransition(ChangeTransform()) addTransition(ChangeImageTransform()) addTransition(ChangeClipBounds()) addTransition(RoundedImageTransition().addTarget(R.id.header)) } }
͍͍ײ͡ʹ࠷ॳͷΛอଘ͢Δ
͍͍ײ͡ʹΞχϝʔγϣϯ͢Δ
None
None