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
160
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.5k
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
Oxlintのカスタムルールの現況
syumai
6
1.1k
不変条件と整合性境界—ビジネスが決める設計判断と実現パターン / Invariants and Consistency Boundaries
nrslib
13
4.3k
Webフレームワークの ベンチマークについて
yusukebe
0
170
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
200
A2UI という光を覗いてみる
satohjohn
1
130
Creating Composable Callables in Contemporary C++
rollbear
0
130
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
250
ふつうのFeature Flag実践入門
irof
7
3.9k
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
760
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
120
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
11
4.1k
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
170
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
56k
BBQ
matthewcrist
89
10k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
190
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
55k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
150
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Faster Mobile Websites
deanohume
310
31k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Code Review Best Practice
trishagee
74
20k
GitHub's CSS Performance
jonrohan
1033
470k
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