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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
880
Customize Error Message
magiepooh
0
910
Kotlin入門
magiepooh
2
1.9k
Adjust Full Screen
magiepooh
2
560
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
Developing with AI Agents — Codex, Claude Code & Cowork Practical Guide
x5gtrn
PRO
0
1.4k
OS アップデート対応の取り組み方がもっと共有されてほしい
andpad
0
110
使用 Meilisearch 建立新聞搜尋工具
johnroyer
0
140
AI がコードを書く時代における新卒エンジニアの仕事風景 (2026) / New Graduate Engineers in the Era of AI Coding (2026)
sushichan044
0
220
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
110
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
12
4.7k
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
260
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
270
AI駆動開発を妨げる技術的負債の解消アプローチ / ai-refactoring-approach
minodriven
17
8.9k
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
1B+ /day規模のログを管理する技術
broadleaf
0
130
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
150
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
270
Navigating Team Friction
lara
192
16k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Unsuck your backbone
ammeep
672
58k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
We Have a Design System, Now What?
morganepeng
55
8.2k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
ラッコキーワード サービス紹介資料
rakko
1
3.9M
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
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