Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

ExtraLayoutSpace of RecyclerView

4,923 views

Published on

About ExtraLayoutSpace

Published in: Technology
  • Be the first to comment

ExtraLayoutSpace of RecyclerView

  1. 1. ExtraLayoutSpace of RecyclerView kyobashi.dex #2 @amyu_san
  2. 2. ABOUT ME ▸ Name : Yuki Mima ▸ Twitter : @amyu_san ▸ github : amyu ▸ Work : Android App Engineer

  3. 3. Why do you use RecyclerView
  4. 4. I can not be implemented in the ListView
  5. 5. TEXT The good point of RecyclerView ▸ Easy implementation of Animation ▸ Easy implementation of Animation ▸ Easy implementation of Animation ▸ Easy implementation of Animation ▸ Easy implementation of pre-load ▸ Easy implementation of Cache
  6. 6. TEXT What is ExtraLayoutSpace ▸ The amount of extra space that should be laid out by LayoutManager.
  7. 7. ExtraLayoutSpace = 0
  8. 8. https://www.youtube.com/watch?v=1xMNmMjqEbI
  9. 9. ExtraLayoutSpace = Display Heigh
  10. 10. https://www.youtube.com/watch?v=4c7ZID7yjII
  11. 11. TEXT How to implement ▸ Override the LinearLayoutManager#getExtraLayoutSpace Returns the amount of extra space that should be laid out by LayoutManager. By default, LinearLayoutManager lays out 1 extra page of items while smooth scrolling and 0 otherwise. You can override this method to implement your custom layout pre-cache logic. protected int getExtraLayoutSpace (RecyclerView.State state)
  12. 12. Laying out invisible elements will eventually come with performance cost!
  13. 13. But it improves user experience!!!!
  14. 14. Try to use!

×