ExtraLayoutSpace of RecyclerView

2,813 views

Published on

About ExtraLayoutSpace

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,813
On SlideShare
0
From Embeds
0
Number of Embeds
1,992
Actions
Shares
0
Downloads
5
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

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!

×