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
ConstraintLayout再入門
Search
Takahiro Shimokawa
March 22, 2017
Programming
2
3.4k
ConstraintLayout再入門
potatotips#38での発表資料です。
Takahiro Shimokawa
March 22, 2017
Tweet
Share
More Decks by Takahiro Shimokawa
See All by Takahiro Shimokawa
PlayStoreでの新しいユーザー訴求 -LiveOpsの活用とその成果-
androhi
0
2.3k
ConcatAdapterを深掘る
androhi
1
360
Android Studio 4.1推しポイント!
androhi
0
1.2k
一人開発でつまづいたときの処方箋
androhi
0
290
Androidの物理ベースアニメーション
androhi
1
550
Firebase Analytics 使用感
androhi
0
850
Support Library v23.2 overview
androhi
0
640
Support Library 総復習
androhi
2
2.4k
(続)エンジニアのためのSketch3入門
androhi
1
2.8k
Other Decks in Programming
See All in Programming
Arm移行タイムアタック
qnighy
0
300
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
Quine, Polyglot, 良いコード
qnighy
4
640
イベント駆動で成長して委員会
happymana
1
320
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
170
ヤプリ新卒SREの オンボーディング
masaki12
0
130
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
Streams APIとTCPフロー制御 / Web Streams API and TCP flow control
tasshi
2
350
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
100
Realtime API 入門
riofujimon
0
150
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
600
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
327
21k
A designer walks into a library…
pauljervisheath
203
24k
Automating Front-end Workflow
addyosmani
1366
200k
Side Projects
sachag
452
42k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
25
1.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
Transcript
ConstraintLayout ࠶ೖ Takahiro Shimokawa in potatotips #38 by @androhi 1
ࣗݾհ • @androhi • FiNC inc. • Android ΞϓϦ։ൃ୲ •
DroidKaigi ӡӦελοϑ by @androhi 2
࣍ 1. ConstraintLayoutͬͯԿ͚ͩͬʁ 2. ConstraintLayoutͷجຊ 3. AndroidStudio2.3ͰՃΘͬͨศརػೳ by @androhi 3
1. ConstraintLayoutͬͯԿ͚ͩͬʁ • RelativeLayoutͷ͍ͭ͢͝ • શͯͷϏϡʔ͕૬ରҐஔͰஔ͞ΕΔ • ΑΓॊೈͳࢦఆ͕Մೳ • LayoutEditorͰ؆୯ʹ͑ΔΑ͏ʹͳ͍ͬͯΔ
(From Build a Responsive UI with ConstraintLayout) by @androhi 4
ඞཁͳͷ ͦͷ1 ConstraintLayout library by @androhi 5
by @androhi 6
ඞཁͳͷ ͦͷ2 build.gradleͷهड़ by @androhi 7
dependencies { compile 'com.android.support.constraint:constraint-layout:1.0.2' } by @androhi 8
2. ConstraintLayoutͷجຊ • ৽͍͠Layout Editor • ੍ΛՃ͢Δ play-ground : ConstraintLayout
Example by @androhi 9
৽͍͠Layout Editor by @androhi 10
by @androhi 11
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" ... android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.android.constraintlayoutexamples.MainActivity"> <android.support.constraint.ConstraintLayout android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="wrap_content">
<Button android:id="@+id/button" ... android:text="@string/centering_views" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" tools:layout_constraintLeft_creator="1" tools:layout_constraintRight_creator="1" /> ... by @androhi 12
੍ΛՃ͢Δ by @androhi 13
ʢҾ༻ : Add a constraintʣ by @androhi 14
3. AndroidStudio2.3ͰՃΘͬͨ3ͭͷศརػ ೳ • ৽ςϯϓϨʔτ • Viewͷେ͖͞ΛΞεϖΫτൺͰઃఆ • Viewಉ࢜ΛͰܨ͍ͩΑ͏ͳ੍ޚ by
@androhi 15
৽ςϯϓϨʔτ by @androhi 16
by @androhi 17
by @androhi 18
Viewͷେ͖͞ΛΞεϖΫτൺͰઃఆ by @androhi 19
by @androhi 20
Viewಉ࢜ΛͰܨ͍ͩΑ͏ͳ੍ޚ by @androhi 21
ʢҾ༻ : Control linear groups with a chainʣ by @androhi
22
·ͱΊ • ConstraintLayoutϨεϙϯγϒϧͳUIΛ࡞ΔͨΊͷػೳ͕ ๛ • Viewʹ੍ΛՃ͢ΔͷͰɺView֊Λϑϥοτʹอͯ Δ • LayoutEditor্ͷૢ࡞׳Ε͕ඞཁͳͷͰɺ·ͣαϯϓϧ Ͱ༡ΜͰΈΔ
by @androhi 23
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝ ·ͨ͠ by @androhi 24