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
HiroYUKI Seto
May 22, 2018
Programming
3
980
What’s new with ConstraintLayout 2.0
2018/5/22
CA.apk #6 - Google I/O 2018 報告会
HiroYUKI Seto
May 22, 2018
Tweet
Share
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
420
MDCの内部実装から学ぶ 表現力の高いViewの作り方
seto_hi
5
1.8k
CoordinatorLayoutのBehaviorを使い倒す
seto_hi
1
410
Jetpack Compose
seto_hi
2
830
UI改善に繋がるエンジニアの立ち回り
seto_hi
2
4.7k
MDCのButtonのCorner Family
seto_hi
1
210
MDCのBottomAppBarのShadowの実現方法
seto_hi
0
1k
Other Decks in Programming
See All in Programming
スタートアップを支える技術戦略と組織づくり
pospome
8
11k
詳細の決定を遅らせつつ実装を早くする
shimabox
2
1.3k
Developing Specifications - Jakarta EE: a Real World Example
ivargrimstad
0
190
2025 컴포즈 마법사
jisungbin
0
150
Rails Girls Sapporo 2ndの裏側―準備の日々から見えた、私が得たもの / SAPPORO ENGINEER BASE #11
lemonade_37
2
190
オフライン対応!Flutterアプリに全文検索エンジンを実装する @FlutterKaigi2025
itsmedreamwalker
2
260
Chart.jsで長い項目を表示するときのハマりどころ
yumechi
0
150
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
260
Herb to ReActionView: A New Foundation for the View Layer @ San Francisco Ruby Conference 2025
marcoroth
0
190
[SF Ruby Conf 2025] Rails X
palkan
0
350
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
160
無秩序からの脱却 / Emergence from chaos
nrslib
1
8.3k
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
65
8k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
BBQ
matthewcrist
89
9.9k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Designing Experiences People Love
moore
142
24k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
680
Navigating Team Friction
lara
190
16k
Java REST API Framework Comparison - PWX 2021
mraible
34
9k
Code Review Best Practice
trishagee
72
19k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
1
46
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でない ライブラリの ご利用は計画的に
以上!