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.
→
Ygor César
May 26, 2018
Technology
0
46
Constraintlayout
Ygor César
May 26, 2018
Tweet
Share
More Decks by Ygor César
See All by Ygor César
Making your life easier with CustomViews
ygorcesar
0
45
Integrando seus Apps Android ao Firebase
ygorcesar
0
58
Other Decks in Technology
See All in Technology
Stately
mu7889yoon
1
110
学生・新卒・ジュニアから目指すSRE
hiroyaonoe
2
570
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
160
システムのアラート調査をサポートするAI Agentの紹介/Introduction to an AI Agent for System Alert Investigation
taddy_919
2
2k
モダンUIでフルサーバーレスなAIエージェントをAmplifyとCDKでサクッとデプロイしよう
minorun365
4
160
Meshy Proプラン課金した
henjin0
0
250
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
変化するコーディングエージェントとの現実的な付き合い方 〜Cursor安定択説と、ツールに依存しない「資産」〜
empitsu
4
1.3k
2026年、サーバーレスの現在地 -「制約と戦う技術」から「当たり前の実行基盤」へ- /serverless2026
slsops
2
220
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
340
Introduction to Sansan, inc / Sansan Global Development Center, Inc.
sansan33
PRO
0
3k
こんなところでも(地味に)活躍するImage Modeさんを知ってるかい?- Image Mode for OpenShift -
tsukaman
0
110
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Leo the Paperboy
mayatellez
4
1.4k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Accessibility Awareness
sabderemane
0
49
Reality Check: Gamification 10 Years Later
codingconduct
0
2k
Prompt Engineering for Job Search
mfonobong
0
160
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Transcript
ConstraintLayout Ygor César Android Developer
ViewGroup • FrameLayout • FlexboxLayout • GridLayout • RelativeLayout •
LinearLayout • TableLayout • GridView • Entre outros...
Evitar hierarquia de views profunda (O chamado layout orientado a
Hadouken)
None
Performance
E então o ConstraintLayout
• Flat View Hieararchy • Fácil de usar com o
Editor de Layouts do Android Studio • Compatível com versões do Android acima da versão 2.3 (Api Level 9) • Xml continua legível • Biblioteca separada
Adicionar dependência ao Build.gradle dependencies { compile 'com.android.support.constraint:constraint-layout:1.1.0' }
Layouts existentes
None
Constraints
Realize ajustes em sua View 1. Aspect Ratio 2. Crie/Delete
uma Constraint 3. Height/Width 4. Margin 5. Bias
Chain
Chain Spread Chain Spread Inside Chain Packed Chain
Groups
Groups <android.support.constraint.Group android:id="@+id/group" android:layout_width="wrap_content" android:layout_height="wrap_content" app:constraint_referenced_ids="button_load,textview_status" />
Guideline
Guideline <android.support.constraint.Guideline android:id="@+id/guideline" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" app:layout_constraintGuide_begin="16dp" />
Já acabou?
Ainda não
Barriers
Barriers
Barriers <android.support.constraint.Barrier android:id="@+id/barrier7" android:layout_width="wrap_content" android:layout_height="wrap_content" app:barrierDirection="end" app:constraint_referenced_ids="textView2,textView1" />
Circular Positioning
Circular Positioning <Button android:id="@+id/buttonA" ... /> <Button android:id="@+id/buttonB" … app:layout_constraintCircle="@+id/buttonA"
app:layout_constraintCircleRadius="100dp" app:layout_constraintCircleAngle="45" />
Layer
Layer <android.support.constraint.Layer android:id="@+id/group" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background=”@color/colorPrimary” app:constraint_referenced_ids="button_load,textview_status" />
Placeholder
Placeholder <android.support.constraint.Placeholder android:id="@+id/template_action" android:layout_width="48dp" android:layout_height="48dp" app:content="@+id/save" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" />
Placeholder placeHolderView.setContentId(R.id.my_view_id)
Obrigado!
Agora acabou!!!
[email protected]
/ygorcesar