This talk is paired with a live coding exercise which adds an additional 20min to the presentation. The coding exercise deep dives into how to communicate with fragments.
2. What is a Fragment?/O que Fragmento?
● A reusable class. / Reutilizaçāo de Classe.
● A layout (xml file).
● Standalone components that contain a view, events and logic. / Componentes
independentes que contém View, Eventos e lógica.
● Used as navigation containers responsible for navigation to other activities,
presenting fragments and passing data. / Utilizado como recipientes de
navegação responsáveis pela navegação para outras atividades, fragmentos
apresentando e passagem de dados.
4. Why does Fragment Architecture matter?/Por
que utilizar Fragmento?
● Reusability/Possibilidade de reutilização
● Separation of concerns/Separar ideias ou problemas do seu código.
● Decoupling/Independente
● Object Oriented Programming (OOP) practices/Práticas de orientaçāo a objetos.
● Modular
5. What we will be covering/Como nós
podemos apresentar
● Embed static and dynamic fragments /fragmentos estáticas e dinâmicas
● Communicating with Fragments - 3 ways /Comunicaçāo com o fragmento- 3
formas
○ Bundle - activity constructs fragment and sends args/ Bundle – activity pode construir um
fragmento e definir os argumentos
○ Events - fragment fires events to an activity via an interface listener /Eventos- Fragmento pode
disparar eventos em uma atividade através de uma interface
○ Methods - activity can call method on a fragment through its instance /Métodos – activity pode
chamar métodos em uma instância fragmento.
6. What we will not be covering
● Fragment Lifecycle
● FragmentManager
● Managing Fragment Backstack
● Fragment Nesting