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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Takahiro Shimokawa
March 22, 2017
Programming
3.5k
2
Share
ConstraintLayout再入門
potatotips#38での発表資料です。
Takahiro Shimokawa
March 22, 2017
More Decks by Takahiro Shimokawa
See All by Takahiro Shimokawa
PlayStoreでの新しいユーザー訴求 -LiveOpsの活用とその成果-
androhi
0
2.9k
ConcatAdapterを深掘る
androhi
1
480
Android Studio 4.1推しポイント!
androhi
0
1.5k
一人開発でつまづいたときの処方箋
androhi
0
400
Androidの物理ベースアニメーション
androhi
1
680
Firebase Analytics 使用感
androhi
0
930
Support Library v23.2 overview
androhi
0
750
Support Library 総復習
androhi
2
2.6k
(続)エンジニアのためのSketch3入門
androhi
1
3k
Other Decks in Programming
See All in Programming
PHPでバイナリをパースして理解するASN.1
muno92
PRO
0
460
サプライチェーン攻撃対策「層を重ねて落ちない壁」を10日間で組み上げた話 #TechLeadConf2026
kashewnuts
1
290
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
710
Lightning-Fast Method Calls with Ruby 4.1 ZJIT / RubyKaigi 2026
k0kubun
3
3.1k
Sans tests, vos agents ne sont pas fiables
nabondance
0
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
460
20260514_its_the_context_window_stupid.pdf
heita
0
1k
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
110
20260514 - build with ai 2026 - build LINE Bot with Gemini CLI
line_developers_tw
PRO
0
450
GoogleCloudとterraform完全に理解した
terisuke
1
200
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
150
RailsTokyo 2026#4: AI様があれば、 Hotwireの弱点は消えるか?
naofumi
2
310
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
49
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.6k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
190
Writing Fast Ruby
sferik
630
63k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
350
Design in an AI World
tapps
1
210
Crafting Experiences
bethany
1
150
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
65
55k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
240
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
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