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.6k
ConcatAdapterを深掘る
androhi
1
420
Android Studio 4.1推しポイント!
androhi
0
1.3k
一人開発でつまづいたときの処方箋
androhi
0
350
Androidの物理ベースアニメーション
androhi
1
610
Firebase Analytics 使用感
androhi
0
900
Support Library v23.2 overview
androhi
0
690
Support Library 総復習
androhi
2
2.5k
(続)エンジニアのためのSketch3入門
androhi
1
2.9k
Other Decks in Programming
See All in Programming
2度もゼロから書き直して、やっとブラウザでぬるぬる動くAIに辿り着いた話
tomoino
0
160
Cursor AI Agentと伴走する アプリケーションの高速リプレイス
daisuketakeda
1
110
Rails産でないDBを Railsに引っ越すHACK - Omotesando.rb #110
lnit
1
160
Perlで痩せる
yuukis
1
680
イベントストーミングから始めるドメイン駆動設計
jgeem
4
830
技術懸念に立ち向かい 法改正を穏便に乗り切った話
pop_cashew
0
1.4k
iOSアプリ開発で 関数型プログラミングを実現する The Composable Architectureの紹介
yimajo
2
210
Blueskyのプラグインを作ってみた
hakkadaikon
1
540
Effect の双対、Coeffect
yukikurage
5
1.4k
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
190
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
130
Webからモバイルへ Vue.js × Capacitor 活用事例
naokihaba
0
610
Featured
See All Featured
Side Projects
sachag
455
42k
The Cult of Friendly URLs
andyhume
79
6.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
16
920
Mobile First: as difficult as doing things right
swwweet
223
9.6k
Scaling GitHub
holman
459
140k
Docker and Python
trallard
44
3.4k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
480
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