Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Layouts
Search
Fabiano França
August 16, 2016
Programming
84
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Layouts
Apresentação no Android Meetup BH #04
Fabiano França
August 16, 2016
More Decks by Fabiano França
See All by Fabiano França
Calabash - Testes de aceitação automatizados para mobile apps
ffranca
0
160
Other Decks in Programming
See All in Programming
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
UPDATE をやめる — EF Core でマスタをバージョン管理する
panda728
PRO
0
1.2k
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
Domain-Driven Transformation
hschwentner
2
2.3k
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
110
sbt 2.0: takeoff
eed3si9n
0
160
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
360
Featured
See All Featured
Docker and Python
trallard
47
4.2k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
How STYLIGHT went responsive
nonsquared
100
6.3k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
2
2.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Building AI with AI
inesmontani
PRO
1
1.3k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
410
Transcript
O que são? Como funcionam? Qual usar? Veja hoje no
meetup #04 layouts
fabiano frança Capixaba residente em Belo Horizonte Android Developer há
1 ano na CI&T
UI no Android
View Hierarchy RelativeLayout LinearLayout ImageView Button TableLayout TableRow TableRow CheckBox
CheckBox CheckBox CheckBox
View Hierarchy ViewGroup ViewGroup View view ViewGroup ViewGroup ViewGroup View
View View View
Layout
Layout Um layout é uma subclasse de ViewGroup Nem sempre
uma subclasse de um ViewGroup é considerada um layout
ViewGroup É uma view que suporta a adição de outras
views
ViewGroup Determinar o tamanho de cada view (fase de “measure”)
e posicionar as views dentro do ViewGroup (fase de “Layout”) Principais responsabilidades
ViewGroup RecyclerView Toolbar ViewPager ... É subclasse de ViewGroup, mas
não é considerado layout
atributos layout_ <?xml version= "1.0" encoding="utf-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width= "match_parent"
android:layout_height= "match_parent" > <TextView android:background= "@color/colorAccent" android:layout_width= "200dp" android:layout_height= "wrap_content" android:text="Hello World!" android:layout_gravity= "right" android:gravity="right"/> </FrameLayout>
Layouts mais comuns
Organiza seu filhos como uma pilha
Overdraw
RASTERIZAÇÃO
RASTERIZAÇÃO
None
None
Organiza seus filhos em um único sentido, horizontal ou vertical.
Posiciona seus filhos em relação a outros filhos ou ao
próprio layout.
TableLayout ou GridLayout
TableLayout ou GridLayout
Posiciona seus filhos em uma grade. Cada view está em
uma linha e coluna.
Qual layout escolher?
None
Fases da construção do layout Measure Layout Draw
None
None
Hierarchy Viewer
None
Não preciso de ninguém. Eu crio meus layouts...
https://goo.gl/e9uijC Draw What You See! … and clip the #e11
out of the rest. Canvas.clipRect() API e quickReject() API
https://goo.gl/e9uijC Draw What You See! … and clip the #e11
out of the rest. Canvas.clipRect() API e quickReject() API
Até a próxima... Exemplo - https://github.com/fabianofranca/layoutsamples Speaker Deck - https://speakerdeck.com/ffranca/layouts
Twitter - https://twitter.com/fabiano_franca