New Views in Android L

New Views in Android L

A short talk about the new views in the L-preview for Android, that I gave at the Dutch Android User Group meetup (http://www.meetup.com/dutch-aug/events/191381302/) in Utrecht.

D0ed2f28dd13ddfb192ebe198623924c?s=128

Wolfram Rittmeyer

July 25, 2014
Tweet

Transcript

  1. New Views in Android L

  2. RecyclerView API documentation: „A flexible view for providing a limited

    window into a large data set“
  3. RecyclerView • Doesn't care about visual representation at all •

    Delegates this to helper classes
  4. LayoutManager • Defines the placement of items • One predefined

    LayoutManager: – LinearLayoutManager
  5. ItemDecorations • Defines how items are separated from each other

    • No default implementation • Called once per onDraw()
  6. Animations • Defines the animations for addition, removal or the

    moving of items • One predefined implementation: – DefaultItemAnimator
  7. Adapter • Defines what gets displayed and how one item

    is displayed • No default implementations • ViewHolder pattern
  8. Adapter sample code

  9. Activity Sample Code

  10. CardView • Adds a border • Two customizations possible: –

    Radius of corners – Background color
  11. What's to Like • Support Library • Animation Support •

    Everything is customizable
  12. What's not to Like • Everything is customizable • Too

    few default implementations • No OnItemSelectedListener • Inconsistencies between source and API • CardView
  13. Open Questions I • Is the API complete?

  14. Open Questions II • Why ViewHolder?

  15. Open Questions III • What about Loaders? • Are Loaders

    dead?
  16. https://plus.google.com/+WolframRittmeyer https://www.twitter.com/RittmeyerW http://www.grokkingandroid.com http://www.grokkingandroid.com/l_preview_views