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
4.9k
UI TestやVisual Regression Testを コスパ良くやる
seto_hi
3
1.8k
事業支援というお仕事
seto_hi
0
410
MDCの内部実装から学ぶ 表現力の高いViewの作り方
seto_hi
5
1.8k
CoordinatorLayoutのBehaviorを使い倒す
seto_hi
1
390
Jetpack Compose
seto_hi
2
780
UI改善に繋がるエンジニアの立ち回り
seto_hi
2
4.7k
MDCのButtonのCorner Family
seto_hi
1
190
MDCのBottomAppBarのShadowの実現方法
seto_hi
0
970
Other Decks in Programming
See All in Programming
PHPで始める振る舞い駆動開発(Behaviour-Driven Development)
ohmori_yusuke
2
240
AIプログラマーDevinは PHPerの夢を見るか?
shinyasaita
1
180
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
250
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
20
3.8k
VS Code Update for GitHub Copilot
74th
1
550
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
420
5つのアンチパターンから学ぶLT設計
narihara
1
140
スタートアップの急成長を支えるプラットフォームエンジニアリングと組織戦略
sutochin26
0
300
Select API from Kotlin Coroutine
jmatsu
1
210
ふつうの技術スタックでアート作品を作ってみる
akira888
0
290
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
170
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
0
400
Featured
See All Featured
Designing Experiences People Love
moore
142
24k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Six Lessons from altMBA
skipperchong
28
3.9k
Side Projects
sachag
455
42k
For a Future-Friendly Web
brad_frost
179
9.8k
The Cult of Friendly URLs
andyhume
79
6.5k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
48
2.9k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
17
950
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.8k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
5
230
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でない ライブラリの ご利用は計画的に
以上!