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
800
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
スマートグラスで並列バイブコーディング
hyshu
0
280
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.8k
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
14
6.7k
Snowflake Summitでの新機能 CoCo / CoWork / snowflake-summit-2026-overall-what-new-coco
tatsuhiro
1
220
どこまでゆるくて許されるのか
tk3fftk
0
430
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
240
20260623_Loop Engineeringで自分の分身の問い合わせBotを作る
ryugen04
0
170
Vite+ Unified Toolchain for the Web
naokihaba
0
700
継続モナドとリアクティブプログラミング
yukikurage
3
400
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
Embedded SREと共に達成した会員管理システムのAWS移行 - SRE NEXT 2026 ランチスポンサーセッション
niftycorp
PRO
0
1.6k
Even G2とAWSで推しのエージェントを召喚しよう!
har1101
1
140
Featured
See All Featured
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
150
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
Claude Code のすすめ
schroneko
67
230k
We Have a Design System, Now What?
morganepeng
55
8.2k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
260
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
300
The Curious Case for Waylosing
cassininazir
1
430
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