English subtitles

← Introducing RecyclerView

Get Embed Code
5 Languages

Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. Recyclerview was added to
    the support library to
  2. ultimately perform many of the same
    functions that list view does.
  3. The addition of material
    design list item animations
  4. necessitated a significant change
    in the way adapters worked.
  5. The list view code was already
    exceptionally complicated.
  6. A relatively monolithic code
    base handled Layout, Recycling,
  7. Selection, UI decorations like dividers,
    Scrolling, Empty View.
  8. The decision was made to start over and
    produce a more flexible control.
  9. RecyclerView is focused on doing
    precisely what its name suggests.
  10. Managing the recycling of views.
  11. Most of the functions of ListView have
    been separated int separate RecyclerView
  12. components.
  13. And we've added an additional
    animator component.
  14. One of the exciting ways this is
    being used is with LayoutMangers.
  15. Which allows us to create different
    pluggable layout experiences.
  16. Of course, we have standard vertical
    list views, and horizontal lists.
  17. It's a big deal if you've been
    doing Android for a while.
  18. It wasn't actually easy
    to do a horizontal list.
  19. Grid layouts and this very cool
  20. staggered grid layout manager which
    lays out children of different sizes.
  21. Which supports horizontal and
  22. vertical layouts as well as the ability
    to layout children in reverse.
  23. One of the key features that
    Recyclerview supports is
  24. custom animations.
  25. So if we delete an item
    the default animator will
  26. nicely animate the closing
    of the space left behind.
  27. And because the animator,
  28. like everything else in
    Recyclerview is plugable.
  29. We can change it and
    customize it, the way it works.
  30. And, because the animator, like just
    about everything else in Recycler View,
  31. is pluggable, we can customize
    the way this works in the future.