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
What’s new with ConstraintLayout 2.0
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
HiroYUKI Seto
May 22, 2018
Programming
1k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
What’s new with ConstraintLayout 2.0
2018/5/22
CA.apk #6 - Google I/O 2018 報告会
HiroYUKI Seto
May 22, 2018
More Decks by HiroYUKI Seto
See All by HiroYUKI Seto
Androidアプリの 安全なリファクタリングを行うパターン集
seto_hi
2
5k
UI TestやVisual Regression Testを コスパ良くやる
seto_hi
3
1.9k
事業支援というお仕事
seto_hi
0
460
MDCの内部実装から学ぶ 表現力の高いViewの作り方
seto_hi
5
1.9k
CoordinatorLayoutのBehaviorを使い倒す
seto_hi
1
470
Jetpack Compose
seto_hi
2
890
UI改善に繋がるエンジニアの立ち回り
seto_hi
2
4.9k
MDCのButtonのCorner Family
seto_hi
1
260
MDCのBottomAppBarのShadowの実現方法
seto_hi
0
1.1k
Other Decks in Programming
See All in Programming
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
320
MySQLとPostgreSQLって何が違うの?
akagami
0
150
信頼性の目標を誰も求めてない
shubox
0
350
GKE アップグレード前に知っておきたい Blue/Green と PDB の関係
stkk
0
110
「寝てても仕事が進む」Claude Codeで組む第二の脳
tomoyafujita2016
0
370
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
120
Hono + Inertia + React で LP を構築した話
oukayuka
2
190
仕様駆動開発の消費期限
watany
20
9.1k
生成AIで帳票OCRが「簡単に」作れる時代になった?
kon_shou
0
1.2k
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
3.9k
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
170
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
160
Featured
See All Featured
Designing Experiences People Love
moore
143
24k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
310
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.1k
Utilizing Notion as your number one productivity tool
mfonobong
4
560
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
A better future with KSS
kneath
240
18k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.5k
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
220
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Exploring anti-patterns in Rails
aemeredith
3
480
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
510
Transcript
What’s new with ConstraintLayout 2.0 CA.apk #6 株式会社ノハナ 瀬戸優之 @seto_hi
自己紹介 • 瀬戸優之 Seto HiroYUKI @seto_hi • Androidエンジニア 兼 アプリデザイナー
• 株式会社ノハナ ◦ 一組でも多くの家族に笑顔を届ける • Material Design大好き • DroidKaigi 2018でConstraintLayoutの内部実装を解説 • Google I/O 2018 参加組
ConstraintLayout 2.0 正式発表!
ConstraintLayout 2.0 正式発表! ライブラリの公開はまだ
Helper機能追加 1. Layout Manipulation 2. Post-Layout Manipulation 3. Rendering or
Decorating
1.Layout Manipulation • Viewのレイアウトを簡単にする機能 ◦ ex. Barrier(1.1~) • app:constaint_referenced_ids に対象のViewのidを指定するだけ
• Linear(LinearLayout風) • Flow(FlexboxLayout風)
2.Post-Layout Manipulation • レイアウト後の操作 • app:constaint_referenced_ids に対象のViewのidを指定するだけ • Fly-in ◦
初回レイアウト時にアニメーションする • Layer ◦ 指定したViewにアニメーションなどをかけれる • Circler Reveal ◦ Circler Reveal
3.Rendering or Decorating • Viewの背景などに描画ができる • app:constaint_referenced_ids に対象のViewのidを指定するだけ
Layout Management
Layout Management • ~1.1 ◦ layoutファイルを2つ用意 ◦ ConstraintSetを使ってコード上で管理 ▪ 各状態ごとに
ConstraintSet.clone(context, layout) ▪ 状態を変える場合には ConstraintSet.applyTo(ConstrainLayout)
Layout Management • 2.0~ ◦ layoutファイルを2つ用意 ◦ xmlにStateを書く ◦ ConstraintLayout.setLayoutDescription(xml)
◦ 状態を変える場合には ConstraintLayout.setState(id)
None
None
新ViewGroup MotionLayout
セッション動画を見て! (29:10~) https://youtu.be/ytZteMo4ETk
MotionLayout • Animationが簡単にできるView ◦ ConstraintLayoutを継承 • 2つ以上の状態間をアニメーションできる ◦ KeyFrameの追加もできる •
Android Studio側のUIも便利 ◦ KeyFrameの追加 ◦ 開始・終了タイミングの変更 ◦ デザイナーでもアニメーション組めるのでは?
セッション動画を見て! (29:10~) https://youtu.be/ytZteMo4ETk
1.1と 何が変わるか
何が変わるか • ~1.1 ◦ 柔軟にレイアウトできる ネストを浅くするためのViewGroup • 2.0~ ◦ 他のViewGroupの機能を網羅
◦ 更に+αの機能がある ▪ Layout、Decoration、Animation ◦ アニメーションに特化したMotionLayout
結論 すべてのViewGroupを ConstraintLayoutに 置き換える時が来た
結論 すべてのViewGroupを ConstraintLayoutに 置き換える時が来た かもしれない
※Stableでない ライブラリの ご利用は計画的に
以上!