Save 37% off PRO during our Black Friday Sale! »

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 ( in Utrecht.


Wolfram Rittmeyer

July 25, 2014


  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