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.5k
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.7k
ConcatAdapterを深掘る
androhi
1
440
Android Studio 4.1推しポイント!
androhi
0
1.4k
一人開発でつまづいたときの処方箋
androhi
0
360
Androidの物理ベースアニメーション
androhi
1
630
Firebase Analytics 使用感
androhi
0
910
Support Library v23.2 overview
androhi
0
700
Support Library 総復習
androhi
2
2.5k
(続)エンジニアのためのSketch3入門
androhi
1
2.9k
Other Decks in Programming
See All in Programming
株式会社 Sun terras カンパニーデック
sunterras
0
270
iOSエンジニア向けの英語学習アプリを作る!
yukawashouhei
0
190
Goで実践するドメイン駆動開発 AIと歩み始めた新規プロダクト開発の現在地
imkaoru
4
800
CSC305 Lecture 06
javiergs
PRO
0
220
スマホから Youtube Shortsを見られないようにする
lemolatoon
25
28k
NixOS + Kubernetesで構築する自宅サーバーのすべて
ichi_h3
0
530
クラシルを支える技術と組織
rakutek
0
200
Domain-centric? Why Hexagonal, Onion, and Clean Architecture Are Answers to the Wrong Question
olivergierke
2
810
2分台で1500examples完走!爆速CIを支える環境構築術 - Kaigi on Rails 2025
falcon8823
3
3.5k
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
10
6.6k
CSC509 Lecture 06
javiergs
PRO
0
260
The Flutter Journey of Building a Live Streaming App — With a Side of Performance Tuning
u503
1
110
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
27
2k
Building an army of robots
kneath
306
46k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
20k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
54
3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
37
2.6k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
132
19k
Visualization
eitanlees
148
16k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
Being A Developer After 40
akosma
91
590k
Designing Experiences People Love
moore
142
24k
The Straight Up "How To Draw Better" Workshop
denniskardys
237
140k
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