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
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
190
[PyCon KR 2026] More Variants, More Diversity for AI Accelerators
achimnol
0
120
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
290
Oxlintはいいぞ(続)
yug1224
1
490
iOS開発×AI駆動開発 〜最近使って便利だったスキルの話〜
nogu66
0
110
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.8k
ソフトウェアラスタライザ
fadis
1
730
Introducing Stack Pull Request in GitHub
kkamegawa
0
110
FastAPI の並行処理モデルを完全に理解する
hoto17296
9
3.3k
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
250
Loosening the Reins: Go Generics Get More Flexible
kuro_kurorrr
0
350
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
130
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.6k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
250
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Why Our Code Smells
bkeepers
PRO
340
58k
Amusing Abliteration
ianozsvald
1
270
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
550
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Visualization
eitanlees
152
17k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
500
Fireside Chat
paigeccino
42
4k
Faster Mobile Websites
deanohume
310
32k
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