Date post: | 14-Apr-2017 |
Category: |
Technology |
Upload: | mima-yuki |
View: | 3,030 times |
Download: | 0 times |
ExtraLayoutSpace of RecyclerView
kyobashi.dex #2 @amyu_san
ABOUT ME
▸ Name : Yuki Mima
▸ Twitter : @amyu_san
▸ github : amyu
▸ Work : Android App Engineer
Why do you use RecyclerView
I can not be implemented in the ListView
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
TEXT
What is ExtraLayoutSpace
▸ The amount of extra space that should be laid out by LayoutManager.
ExtraLayoutSpace = 0
ExtraLayoutSpace = Display Heigh
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)
Laying out invisible elements will eventually come with performance cost!
But it improves user experience!!!!
Try to use!