28
PROGRAMAÇÃO PARA DISPOSITIVOS MÓVEIS Aula 5 – Layouts específicos + Menu

Aula 5 - 24/04 (Landscape / Portrait)

Embed Size (px)

DESCRIPTION

Aprendendo a montar layouts para as orientações Landscape e Portrait.

Citation preview

Page 1: Aula 5 - 24/04 (Landscape / Portrait)

PROGRAMAÇÃO PARADISPOSITIVOS MÓVEIS

Aula 5 – Layouts específicos + Menu

Page 2: Aula 5 - 24/04 (Landscape / Portrait)

Objetivos da aula

Layouts específicos (port / land)

Page 3: Aula 5 - 24/04 (Landscape / Portrait)

O que significa Portrait e Landscape?

Page 4: Aula 5 - 24/04 (Landscape / Portrait)
Page 5: Aula 5 - 24/04 (Landscape / Portrait)

Como funciona?

Page 6: Aula 5 - 24/04 (Landscape / Portrait)

Gire seu device!

Page 7: Aula 5 - 24/04 (Landscape / Portrait)

Exemplos!

Page 8: Aula 5 - 24/04 (Landscape / Portrait)
Page 9: Aula 5 - 24/04 (Landscape / Portrait)
Page 10: Aula 5 - 24/04 (Landscape / Portrait)

É o mesmo layout.xml?

Page 11: Aula 5 - 24/04 (Landscape / Portrait)
Page 12: Aula 5 - 24/04 (Landscape / Portrait)

É o mesmo layout.xml?

Talvez!

Page 13: Aula 5 - 24/04 (Landscape / Portrait)

É o mesmo layout.xml?

Page 14: Aula 5 - 24/04 (Landscape / Portrait)
Page 15: Aula 5 - 24/04 (Landscape / Portrait)

É o mesmo layout.xml?

Não!

Page 16: Aula 5 - 24/04 (Landscape / Portrait)

Como faremos?

Page 17: Aula 5 - 24/04 (Landscape / Portrait)

Crie o diretório res/layout-land

Page 18: Aula 5 - 24/04 (Landscape / Portrait)

Copie seu layout para cá

Page 19: Aula 5 - 24/04 (Landscape / Portrait)

Crie o diretório res/layout-port

Page 20: Aula 5 - 24/04 (Landscape / Portrait)

Copie seu layout para cá, também

Page 21: Aula 5 - 24/04 (Landscape / Portrait)

Neste, coloque um botão acima do outro

Page 22: Aula 5 - 24/04 (Landscape / Portrait)

Teste sua aplicação!

Page 23: Aula 5 - 24/04 (Landscape / Portrait)
Page 24: Aula 5 - 24/04 (Landscape / Portrait)
Page 25: Aula 5 - 24/04 (Landscape / Portrait)

Exercício!

Page 26: Aula 5 - 24/04 (Landscape / Portrait)
Page 27: Aula 5 - 24/04 (Landscape / Portrait)
Page 28: Aula 5 - 24/04 (Landscape / Portrait)

Até a próxima!