Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
430
MDCの内部実装から学ぶ 表現力の高いViewの作り方
seto_hi
5
1.8k
CoordinatorLayoutのBehaviorを使い倒す
seto_hi
1
420
Jetpack Compose
seto_hi
2
850
UI改善に繋がるエンジニアの立ち回り
seto_hi
2
4.7k
MDCのButtonのCorner Family
seto_hi
1
220
MDCのBottomAppBarのShadowの実現方法
seto_hi
0
1k
Other Decks in Programming
See All in Programming
Go コードベースの構成と AI コンテキスト定義
andpad
0
140
マスタデータ問題、マイクロサービスでどう解くか
kts
0
120
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
Developing static sites with Ruby
okuramasafumi
0
320
AIコーディングエージェント(Manus)
kondai24
0
210
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
160
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
160
LLMで複雑な検索条件アセットから脱却する!! 生成的検索インタフェースの設計論
po3rin
4
970
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
230
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
1
270
perlをWebAssembly上で動かすと何が嬉しいの??? / Where does Perl-on-Wasm actually make sense?
mackee
0
120
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
440
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
WENDY [Excerpt]
tessaabrams
8
35k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
260
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
210
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.8k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
0
170
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
92
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
250
Build The Right Thing And Hit Your Dates
maggiecrowley
38
3k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
88
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.3k
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でない ライブラリの ご利用は計画的に
以上!