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
MotionLayout in 5min
Search
itome
October 09, 2018
Programming
170
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
MotionLayout in 5min
itome
October 09, 2018
More Decks by itome
See All by itome
今日始め るCloudflare Browser Rendering
itome
2
340
Android accessibility and automated check tools
itome
1
5.1k
Accessibility in CATS
itome
4
2.6k
Introduce_Owl.pdf
itome
0
120
Introducing Android Accessibility Test with Accessibility Testing Framework
itome
1
810
Introduction of accessibility for mobile development
itome
0
260
Architecture_for_mobile_development.pdf
itome
0
280
Android_Accessibility_Suite.pdf
itome
0
170
Introducing Owl
itome
0
1.2k
Other Decks in Programming
See All in Programming
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
180
ここ半年くらいでAIに作らせたR用ツール
eitsupi
0
360
Google Apps Script で Ruby を動かす
kawahara
0
120
数百円から始めるRuby電子工作
tarosay
0
120
ITヒヤリハットを整理してみた ~ライフサイクルと原因から考える再発防止策~
koukimiura
1
130
【やさしく解説 設計編 #0】DDDのコード、読めるのに分からない人へ
panda728
PRO
2
290
SREの積み重ねがAI駆動開発のガードレールになった ― 7つの実践/SRE Guardrails The 7
tomoyakitaura
9
5.9k
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
790
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
480
作るコストが小さくなった時代 幸せに働くために改めて考えたいこと 〜エンジニアとして価値を出し続けるために注視している二分野〜
yuppeeng
0
170
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
200
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
950
Featured
See All Featured
Building Applications with DynamoDB
mza
96
7.1k
For a Future-Friendly Web
brad_frost
183
10k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
390
We Have a Design System, Now What?
morganepeng
55
8.2k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
920
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
410
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
4 Signs Your Business is Dying
shpigford
187
22k
The browser strikes back
jonoalderson
0
1.4k
Google's AI Overviews - The New Search
badams
0
1.1k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
200
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
470
Transcript
5ͰΘ͔Δ MotionLayout ! https://twitter.com/itometeam " https://github.com/itome # https://medium.com/@itometeam potatotips #55
Takeshi Tsukamoto
1min MotionLayoutͱʁ
1min MotionLayoutͱʁ ɾӈͷΑ͏ͳΞχϝʔγϣϯ͕؆୯ʹ࣮Ͱ͖Δ ɾConstraintLayout2.0.0͔Βಋೖ ɾConstraintLayoutͱಉ༷ʹϨΠΞτΛΜͰɺ ɹMotionSceneͱ͍͏ΞχϝʔγϣϯఆٛϑΝΠϧΛ ɹΛࢦఆ͢Δ͚ͩͰ࣮Ͱ͖Δ
2min MotionLayoutͷ͍ํ
5 2min MotionLayout͍ํ εϫΠϓͰҠಈ͢ΔӈͷΑ͏ͳϨΠΞτ Λ࡞ͬͯΈ·͢ɻ
6 2min MotionLayout͍ํ <?xml version="1.0" encoding="utf-8"?> <android.support.constraint.motion.MotionLayout … app:layoutDescription="@xml/scene_01" tools:showPaths="true">
<View android:id="@+id/button" android:layout_width="64dp" android:layout_height="64dp" android:background="@color/colorAccent" android:text="Button" /> </android.support.constraint.motion.MotionLayout> ConstraintLayoutΛ MotionLayoutʹஔ͖͑ layoutDescriptionʹ sceneϑΝΠϧΛࢦఆ
7 2min MotionLayout͍ํ <?xml version="1.0" encoding="utf-8"?> <MotionScene xmlns:android="http://schemas.android.com/apk/res/android" xmlns:motion="http://schemas.android.com/apk/res-auto"> <Transition
motion:constraintSetEnd="@+id/end" motion:constraintSetStart="@+id/start" motion:duration="1000"> <OnSwipe motion:dragDirection="dragRight" motion:touchAnchorId="@id/button" motion:touchAnchorSide="right" /> </Transition> <ConstraintSet android:id="@+id/start">…</ConstraintSet> <ConstraintSet android:id="@+id/end">…</ConstraintSet> </MotionScene> constraintSetStartͱ constraintSetEndʹ࢝ͱऴͷ ConstraintSetΛࢦఆ ΞχϝʔγϣϯͷτϦΨʔΛ ࢦఆ͢Δ
8 2min MotionLayout͍ํ <ConstraintSet android:id="@+id/start"> <Constraint android:id="@id/button" android:layout_width="64dp" android:layout_height="64dp" android:layout_marginStart="8dp"
motion:layout_constraintBottom_toBottomOf="parent" motion:layout_constraintStart_toStartOf="parent" motion:layout_constraintTop_toTopOf="parent" /> </ConstraintSet> <ConstraintSet android:id="@+id/end"> <Constraint android:id="@id/button" android:layout_width="64dp" android:layout_height="64dp" android:layout_marginEnd="8dp" motion:layout_constraintBottom_toBottomOf="parent" motion:layout_constraintEnd_toEndOf="parent" motion:layout_constraintTop_toTopOf="parent" /> </ConstraintSet> layout_ଐੑͷΈΛࢦఆ͢Δ ※ݩͷϨΠΞτϑΝΠϧʹ ࢦఆͨ͠layout_ଐੑશͯ Ϧηοτ͞ΕΔͷͰҙ
1min ଞʹԿ͕Ͱ͖Δͷʁ
10 1min ଞʹԿ͕Ͱ͖Δʁ ɾlayout_Ҏ֎ͷଐੑΛมߋ͍ͨ͠ →CustomAttributeͰࢦఆͰ͖·͢ʂ
11 1min ଞʹԿ͕Ͱ͖Δʁ ɾ࢝ͱऴҎ֎ͰଐੑΛมߋ͍ͨ͠ →KeyframeͰࢦఆͰ͖·͢ʂ
1min Ͱ͖ͳ͍͜ͱͳ͍ͷʁ
13 1min Ͱ͖ͳ͍͜ͱͳ͍ͷʁ ɾ3ͭҎ্ͷঢ়ଶΛͭϨΠΞτ ɾ૬ରͰભҠ͢ΔΞχϝʔγϣϯ ɾෳํͷυϥοάΛΞχϝʔγϣϯͷτϦΨʔʹ͢Δ ɾଙཁૉҎԼʹΞχϝʔγϣϯΛద༻͢Δ ͜Μͳ͜ͱΛ͍ͨ͠ͱ͖ଞͷΞχϝʔγϣϯ࣮Λݕ౼͠·͠ΐ͏
14 1min Ͱ͖ͳ͍͜ͱͳ͍ͷʁ ݱࡏͷ࠷৽όʔδϣϯ(ConstraintLayout2.0.0-alpha2)Ͱ VisibilityͳͲͷಈతͳมߋ͕Ͱ͖·ͤΜɻ 2.0.0-alpha3Ͱमਖ਼༧ఆΒ͍͠ͷͰͦΕ·Ͱͪ·͠ΐ͏
͋Γ͕ͱ͏͍͟͝·ͨ͠ ! https://twitter.com/itometeam " https://github.com/itome # https://medium.com/@itometeam Takeshi Tsukamoto