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
act1-costs.pdf
sumedhbala
0
170
「正の参照」と 「負の導出」で組む ハーネスエンジニアリング
cottpan
1
120
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1k
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
430
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
0
140
The Bowling Game- From Imperative to Functional Programming - Part 1
philipschwarz
PRO
0
290
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
570
技術記事、 専門家としてのプログラマ、 言語化
mizchi
14
7.3k
AIエージェントで 変わるAndroid開発環境
takahirom
1
450
フィードバックで育てるAI開発
kotaminato
1
110
才能?センス?知らん、 続けたもん勝ちだ。-- 結婚・出産・癌を越えてなお、私がプロダクトを創り続ける理由
16bitidol
2
790
ローカルLLMでどこまでコードが書けるか -縮小版 / How much code can be written on a local LLM Shortened
kishida
2
180
Featured
See All Featured
Crafting Experiences
bethany
1
210
RailsConf 2023
tenderlove
30
1.5k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.5k
A Tale of Four Properties
chriscoyier
163
24k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
890
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.6k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
890
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
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