Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Layouts

 Layouts

Apresentação no Android Meetup BH #04

Avatar for Fabiano França

Fabiano França

August 16, 2016

More Decks by Fabiano França

Other Decks in Programming

Transcript

  1. Layout Um layout é uma subclasse de ViewGroup Nem sempre

    uma subclasse de um ViewGroup é considerada um layout
  2. ViewGroup Determinar o tamanho de cada view (fase de “measure”)

    e posicionar as views dentro do ViewGroup (fase de “Layout”) Principais responsabilidades
  3. 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>
  4. https://goo.gl/e9uijC Draw What You See! … and clip the #e11

    out of the rest. Canvas.clipRect() API e quickReject() API
  5. https://goo.gl/e9uijC Draw What You See! … and clip the #e11

    out of the rest. Canvas.clipRect() API e quickReject() API