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
48
0
Share
Constraintlayout
Ygor César
May 26, 2018
More Decks by Ygor César
See All by Ygor César
Making your life easier with CustomViews
ygorcesar
0
47
Integrando seus Apps Android ao Firebase
ygorcesar
0
62
Other Decks in Technology
See All in Technology
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
kaomi_wombat
0
280
第26回FA設備技術勉強会 - Claude/Claude_codeでデータ分析 -
happysamurai294
0
200
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
PostgreSQL 18のNOT ENFORCEDな制約とDEFERRABLEの関係
yahonda
0
150
Move Fast and Break Things: 10 in 20
ramimac
0
100
FlutterでPiP再生を実装した話
s9a17
0
240
AIにより大幅に強化された AWS Transform Customを触ってみる
0air
0
230
AI時代のIssue駆動開発のススメ
moongift
PRO
0
320
MCPで決済に楽にする
mu7889yoon
0
160
DMBOKを使ってレバレジーズのデータマネジメントを評価した
leveragestech
0
490
【社内勉強会】新年度からコーディングエージェントを使いこなす - 構造と制約で引き出すClaude Codeの実践知
nwiizo
34
16k
Amazon Qはアマコネで頑張っています〜 Amazon Q in Connectについて〜
yama3133
1
170
Featured
See All Featured
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
250
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
199
73k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
64
54k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
280
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
120
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
150
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
160
Building a Scalable Design System with Sketch
lauravandoore
463
34k
30 Presentation Tips
portentint
PRO
1
260
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
660
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