Submit Search
Upload
Aula 10 04 (Gerenciadores de layouts)
•
Download as PPSX, PDF
•
0 likes
•
681 views
Ricardo Longa
Follow
Organizando os componentes visuais.
Read less
Read more
Technology
Report
Share
Report
Share
1 of 39
Download now
Recommended
Lab 10 gride view
Lab 10 gride view
Phonepaseuth Phonhdala
Actividad 11
Actividad 11
Juan Plascencia Zepeda
Fragmentwithouttag
Fragmentwithouttag
university of Gujrat, pakistan
Practica 2
Practica 2
Erick Ramirez
Actividad 9
Actividad 9
Juan Plascencia Zepeda
Pract 8
Pract 8
Ricardo Elizondo López
Uts mb
Uts mb
fajarfendika
Nearby Messages API
Nearby Messages API
akkuma
Recommended
Lab 10 gride view
Lab 10 gride view
Phonepaseuth Phonhdala
Actividad 11
Actividad 11
Juan Plascencia Zepeda
Fragmentwithouttag
Fragmentwithouttag
university of Gujrat, pakistan
Practica 2
Practica 2
Erick Ramirez
Actividad 9
Actividad 9
Juan Plascencia Zepeda
Pract 8
Pract 8
Ricardo Elizondo López
Uts mb
Uts mb
fajarfendika
Nearby Messages API
Nearby Messages API
akkuma
Pract 7
Pract 7
Ricardo Elizondo López
Utilizando diretivas com AngularJS
Utilizando diretivas com AngularJS
Rodrigo Branas
Validando Formulários com AngularJS
Validando Formulários com AngularJS
Rodrigo Branas
Evoluindo a arquitetura de uma aplicação com AngularJS
Evoluindo a arquitetura de uma aplicação com AngularJS
Rodrigo Branas
Actividad 02
Actividad 02
Jose AC
Actividad 01
Actividad 01
Erick Ramirez
Aplicando filtros com AngularJS
Aplicando filtros com AngularJS
Rodrigo Branas
Practica 5
Practica 5
Erick Ramirez
Lab 9 list view
Lab 9 list view
Phonepaseuth Phonhdala
Actividad 01
Actividad 01
Jose AC
FB login
FB login
Sambas Jundi Mahfuzdi
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Melina Krisnawati
Practica 4
Practica 4
Erick Ramirez
Aula 22/05 (Handler)
Aula 22/05 (Handler)
Ricardo Longa
Aula 5 - 24/04 (Landscape / Portrait)
Aula 5 - 24/04 (Landscape / Portrait)
Ricardo Longa
Aula 17 04 (Exercícios e ScrollView)
Aula 17 04 (Exercícios e ScrollView)
Ricardo Longa
Aula 10 04 (intents)
Aula 10 04 (intents)
Ricardo Longa
Introduction Android - C.E.S.A.R
Introduction Android - C.E.S.A.R
Renato
Android Palestra
Android Palestra
Renato
android_overview
android_overview
Renato
Android na prática - USCS
Android na prática - USCS
Renato
Aula 05/06 (Service)
Aula 05/06 (Service)
Ricardo Longa
More Related Content
What's hot
Pract 7
Pract 7
Ricardo Elizondo López
Utilizando diretivas com AngularJS
Utilizando diretivas com AngularJS
Rodrigo Branas
Validando Formulários com AngularJS
Validando Formulários com AngularJS
Rodrigo Branas
Evoluindo a arquitetura de uma aplicação com AngularJS
Evoluindo a arquitetura de uma aplicação com AngularJS
Rodrigo Branas
Actividad 02
Actividad 02
Jose AC
Actividad 01
Actividad 01
Erick Ramirez
Aplicando filtros com AngularJS
Aplicando filtros com AngularJS
Rodrigo Branas
Practica 5
Practica 5
Erick Ramirez
Lab 9 list view
Lab 9 list view
Phonepaseuth Phonhdala
Actividad 01
Actividad 01
Jose AC
FB login
FB login
Sambas Jundi Mahfuzdi
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Melina Krisnawati
Practica 4
Practica 4
Erick Ramirez
What's hot
(13)
Pract 7
Pract 7
Utilizando diretivas com AngularJS
Utilizando diretivas com AngularJS
Validando Formulários com AngularJS
Validando Formulários com AngularJS
Evoluindo a arquitetura de uma aplicação com AngularJS
Evoluindo a arquitetura de uma aplicação com AngularJS
Actividad 02
Actividad 02
Actividad 01
Actividad 01
Aplicando filtros com AngularJS
Aplicando filtros com AngularJS
Practica 5
Practica 5
Lab 9 list view
Lab 9 list view
Actividad 01
Actividad 01
FB login
FB login
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Kode program layout xml dan tampilan ui graphical (menggunakan eclipse)
Practica 4
Practica 4
Viewers also liked
Aula 22/05 (Handler)
Aula 22/05 (Handler)
Ricardo Longa
Aula 5 - 24/04 (Landscape / Portrait)
Aula 5 - 24/04 (Landscape / Portrait)
Ricardo Longa
Aula 17 04 (Exercícios e ScrollView)
Aula 17 04 (Exercícios e ScrollView)
Ricardo Longa
Aula 10 04 (intents)
Aula 10 04 (intents)
Ricardo Longa
Introduction Android - C.E.S.A.R
Introduction Android - C.E.S.A.R
Renato
Android Palestra
Android Palestra
Renato
android_overview
android_overview
Renato
Android na prática - USCS
Android na prática - USCS
Renato
Aula 05/06 (Service)
Aula 05/06 (Service)
Ricardo Longa
Aula 12/06 (SQLite)
Aula 12/06 (SQLite)
Ricardo Longa
Aula 05/06 (Notification)
Aula 05/06 (Notification)
Ricardo Longa
Pomodoro agil
Pomodoro agil
Renato
Treze ferramentas/frameworks para desenvolvimento android
Treze ferramentas/frameworks para desenvolvimento android
Ricardo Longa
Aula04 android intents
Aula04 android intents
Roberson Alves
Aula 6 - 08/05 (SharedPreferences)
Aula 6 - 08/05 (SharedPreferences)
Ricardo Longa
Oficina Sesc Android - V1
Oficina Sesc Android - V1
Odair Bonin Borges
K19 k41 Desenvolvimento Mobile com Android
K19 k41 Desenvolvimento Mobile com Android
Aline Diniz
Aula 6 - 08/05 (Menu)
Aula 6 - 08/05 (Menu)
Ricardo Longa
Aula 29/05 (AlarmManager)
Aula 29/05 (AlarmManager)
Ricardo Longa
Atividades e Intenções (Android)
Atividades e Intenções (Android)
Natanael Fonseca
Viewers also liked
(20)
Aula 22/05 (Handler)
Aula 22/05 (Handler)
Aula 5 - 24/04 (Landscape / Portrait)
Aula 5 - 24/04 (Landscape / Portrait)
Aula 17 04 (Exercícios e ScrollView)
Aula 17 04 (Exercícios e ScrollView)
Aula 10 04 (intents)
Aula 10 04 (intents)
Introduction Android - C.E.S.A.R
Introduction Android - C.E.S.A.R
Android Palestra
Android Palestra
android_overview
android_overview
Android na prática - USCS
Android na prática - USCS
Aula 05/06 (Service)
Aula 05/06 (Service)
Aula 12/06 (SQLite)
Aula 12/06 (SQLite)
Aula 05/06 (Notification)
Aula 05/06 (Notification)
Pomodoro agil
Pomodoro agil
Treze ferramentas/frameworks para desenvolvimento android
Treze ferramentas/frameworks para desenvolvimento android
Aula04 android intents
Aula04 android intents
Aula 6 - 08/05 (SharedPreferences)
Aula 6 - 08/05 (SharedPreferences)
Oficina Sesc Android - V1
Oficina Sesc Android - V1
K19 k41 Desenvolvimento Mobile com Android
K19 k41 Desenvolvimento Mobile com Android
Aula 6 - 08/05 (Menu)
Aula 6 - 08/05 (Menu)
Aula 29/05 (AlarmManager)
Aula 29/05 (AlarmManager)
Atividades e Intenções (Android)
Atividades e Intenções (Android)
More from Ricardo Longa
Big Data como Serviço: da captura à visualização de dados com alto desempenho
Big Data como Serviço: da captura à visualização de dados com alto desempenho
Ricardo Longa
Minicurso sobre AndroidAnnotations, GreenDAO, EventBus e Crouton
Minicurso sobre AndroidAnnotations, GreenDAO, EventBus e Crouton
Ricardo Longa
Adopt a JSR
Adopt a JSR
Ricardo Longa
JSR 339 - Java API for RESTful Web Services
JSR 339 - Java API for RESTful Web Services
Ricardo Longa
JBoss Forge 2
JBoss Forge 2
Ricardo Longa
Android - Programação para dispositivos móveis (Aula 2)
Android - Programação para dispositivos móveis (Aula 2)
Ricardo Longa
Android - Programação para dispositivos móveis (Aula 1)
Android - Programação para dispositivos móveis (Aula 1)
Ricardo Longa
Da introdução à prática no desenvolvimento Android
Da introdução à prática no desenvolvimento Android
Ricardo Longa
Open Networking
Open Networking
Ricardo Longa
Da introdução à prática com Drools Expert e Drools Flow
Da introdução à prática com Drools Expert e Drools Flow
Ricardo Longa
More from Ricardo Longa
(10)
Big Data como Serviço: da captura à visualização de dados com alto desempenho
Big Data como Serviço: da captura à visualização de dados com alto desempenho
Minicurso sobre AndroidAnnotations, GreenDAO, EventBus e Crouton
Minicurso sobre AndroidAnnotations, GreenDAO, EventBus e Crouton
Adopt a JSR
Adopt a JSR
JSR 339 - Java API for RESTful Web Services
JSR 339 - Java API for RESTful Web Services
JBoss Forge 2
JBoss Forge 2
Android - Programação para dispositivos móveis (Aula 2)
Android - Programação para dispositivos móveis (Aula 2)
Android - Programação para dispositivos móveis (Aula 1)
Android - Programação para dispositivos móveis (Aula 1)
Da introdução à prática no desenvolvimento Android
Da introdução à prática no desenvolvimento Android
Open Networking
Open Networking
Da introdução à prática com Drools Expert e Drools Flow
Da introdução à prática com Drools Expert e Drools Flow
Aula 10 04 (Gerenciadores de layouts)
1.
PROGRAMAÇÃO PARA DISPOSITIVOS MÓVEIS Aula
3 – View (parte 1)
2.
Objetivos da aula
Views – Gerenciadores de layouts
3.
4.
Classe mãe de
todos os componentes visuais...
5.
Widgets!
6.
Gerenciadores de layouts!
7.
Você também pode
criar seus componentes visuais. Basta estender android.view.View e sobrescrever onDraw(Canvas canvas).
8.
Principais classes... FrameLayout;
LinearLayout; TableLayout; RelativeLayout; AbsoluteLayout. Todos têm: android:layout_width e android:layout_height
9.
FrameLayout Utilizado quando a
tela tem apenas um componente que pode preencher a tela inteira.
10.
1. <FrameLayout android:layout_width="wrap_content" 2.
android:layout_height="wrap_content" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="FrameLayout“ 7. android:layout_width="wrap_content" 8. android:layout_height="wrap_content" /> 9. 10. </FrameLayout>
11.
1. <FrameLayout android:layout_width="wrap_content" 2.
android:layout_height="wrap_content" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="FrameLayout“ 7. android:layout_width="wrap_content" 8. android:layout_height="wrap_content" /> 9. 10. </FrameLayout>
12.
1. <FrameLayout android:layout_width="fill_parent" 2.
android:layout_height="wrap_content" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="FrameLayout“ 7. android:layout_width="wrap_content" 8. android:layout_height="wrap_content" /> 9. 10. </FrameLayout>
13.
1. <FrameLayout android:layout_width="fill_parent" 2.
android:layout_height="wrap_content" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="FrameLayout“ 7. android:layout_width="wrap_content" 8. android:layout_height="wrap_content" /> 9. 10. </FrameLayout>
14.
1. <FrameLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="FrameLayout“ 7. android:layout_width="wrap_content" 8. android:layout_height="wrap_content" /> 9. 10. </FrameLayout>
15.
1. <FrameLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="FrameLayout“ 7. android:layout_width="wrap_content" 8. android:layout_height="wrap_content“ 9. android:background="#ADFF2F" /> 10. 11. </FrameLayout>
16.
1. <FrameLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="FrameLayout“ 7. android:layout_width="wrap_content" 8. android:layout_height="wrap_content“ 9. android:background="#ADFF2F" /> 10. 11. </FrameLayout>
17.
1. <FrameLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="FrameLayout“ 7. android:layout_width=“fill_parent" 8. android:layout_height="wrap_content“ 9. android:background="#ADFF2F" /> 10. 11. </FrameLayout>
18.
1. <FrameLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="FrameLayout“ 7. android:layout_width=“fill_parent" 8. android:layout_height="wrap_content“ 9. android:background="#ADFF2F" /> 10. 11. </FrameLayout>
19.
1. <FrameLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="FrameLayout“ 7. android:layout_width=“fill_parent" 8. android:layout_height="fill_parent“ 9. android:background="#ADFF2F" /> 10. 11. </FrameLayout>
20.
LinearLayout Posiciona os componentes
na vertical ou horizontal (default).
21.
1. <LinearLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83" 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text=“PrimeiroLayout“ 7. android:background="#ADFF2F" /> 8. 9. <TextView android:text=“SegundoLayout“ 10. android:background="#E32636" /> 11. 12. </LinearLayout>
22.
1. <LinearLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83“ 4. android:orientation=“vertical" 5. tools:context=".Exercicio3"> 6. 7. <TextView android:text=“PrimeiroLayout“ 8. android:background="#ADFF2F" /> 9. 10. <TextView android:text=“SegundoLayout“ 11. android:background="#E32636" /> 12. 13. </LinearLayout>
23.
1. <LinearLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83“ 4. android:orientation=“vertical" 5. tools:context=".Exercicio3"> 6. 7. <TextView android:text=“PrimeiroLayout“ 8. android:layout_gravity="center_horizontal" 9. android:background="#ADFF2F" /> 10. 11. <TextView android:text=“SegundoLayout“ 12. android:layout_gravity=“right" 13. android:background="#E32636" /> 14. 15. </LinearLayout>
24.
TableLayout Posiciona os componentes
em uma tabela.
25.
1. <TableLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83“ 4. tools:context=".Exercicio3"> 5. 6. <TableRow> 7. <TextView android:text="Coluna 1“ android:background="#ADFF2F" /> 8. <TextView android:text="Coluna 2" android:background="#E32636" /> 9. </TableRow> 10. 11. <TableRow> 12. <TextView android:text="Coluna 1" android:background="#FFFF00" /> 13. <TextView android:text="Coluna 2" android:background="#800000" /> 14. </TableRow> 15. 16. </TableLayout>
26.
1. <TableLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83“ 4. android:stretchColumns="1" 5. tools:context=".Exercicio3"> 6. 7. <TableRow> 8. <TextView android:text="Coluna 1“ android:background="#ADFF2F" /> 9. <TextView android:text="Coluna 2" android:background="#E32636" /> 10. </TableRow> 11. 12. <TableRow> 13. <TextView android:text="Coluna 1" android:background="#FFFF00" /> 14. <TextView android:text="Coluna 2" android:background="#800000" /> 15. </TableRow> 16. 17. </TableLayout> 1° posição é 0.
27.
1. <TableLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83“ 4. android:stretchColumns="1" 5. tools:context=".Exercicio3"> 6. 7. <TableRow> 8. <TextView android:text="Coluna 1“ android:background="#ADFF2F" /> 9. <TextView android:text="Coluna 2" android:background="#E32636" /> 10. </TableRow> 11. <TableRow> 12. <TextView android:text="Coluna 1" android:background="#FFFF00" /> 13. <TextView android:text="Coluna 2" android:background="#800000" /> 14. </TableRow> 15. <TableRow> 16. <Button android:text=“Cadastrar” /> 17. </TableRow> 18. 19. </TableLayout>
28.
1. <TableLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83“ 4. android:stretchColumns="1" 5. tools:context=".Exercicio3"> 6. 7. <TableRow> 8. <TextView android:text="Coluna 1“ android:background="#ADFF2F" /> 9. <TextView android:text="Coluna 2" android:background="#E32636" /> 10. </TableRow> 11. <TableRow> 12. <TextView android:text="Coluna 1" android:background="#FFFF00" /> 13. <TextView android:text="Coluna 2" android:background="#800000" /> 14. </TableRow> 15. <TableRow android:gravity="right"> 16. <Button android:text=“Cadastrar” /> 17. </TableRow> 18. 19. </TableLayout>
29.
RelativeLayout Posiciona um componente
relativo ao outro.
30.
1. <RelativeLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83“ 4. tools:context=".Exercicio3"> 5. 6. <TextView android:text="Ricardo" 7. android:background="#ADFF2F" 8. android:layout_width="wrap_content“ 9. android:layout_height="wrap_content" /> 10. 11. <TextView android:text="Longa" 12. android:background="#E32636" 13. android:layout_width="wrap_content“ 14. android:layout_height="wrap_content" /> 15. 16. </TableLayout>
31.
1. <RelativeLayout android:layout_width="fill_parent" 2.
android:layout_height=“fill_parent" 3. android:background="#8B8B83“ 4. tools:context=".Exercicio3"> 5. 6. <TextView android:id="@+id/idRequerido" 7. android:text="Ricardo" 8. android:background="#ADFF2F" 9. android:layout_width="wrap_content“ 10. android:layout_height="wrap_content" /> 11. 12. <TextView android:text="Longa" 13. android:background="#E32636" 14. android:layout_below="@id/idRequerido" 15. android:layout_width="wrap_content“ 16. android:layout_height="wrap_content" /> 17. 18. </TableLayout> Os componentes se referenciam-se através dos Ids. O componente referenciado deve estar declarado acima do componente que o referencia.
32.
RelativeLayout... android:layout_below =>
abaixo; android:layout_above => acima; android:layout_toRightOf => à direita; android:layout_toLeftOf => à esquerda; android:layout_alignParentTop => no topo; ...
33.
RelativeLayout... Cuidado ao
modificar os componentes; É necessário conhecer bem os atributos.
34.
AbsoluteLayout Posiciona os componentes
baseando-se nas coordenadas x e y.
35.
36.
37.
AbsoluteLayout... Problemático em
virtude da imensa quantidade de dispositivos com diferentes resoluções de tela.
38.
39.
Obrigado!
Download now