-
public class RecyclerView.ItemAnimator.ItemHolderInfo
A simple data structure that holds information about an item's bounds.This information is used in calculating item animations. Default implementation of recordPreLayoutInformation and recordPostLayoutInformation returns this datastructure. You can extend this class if you would like to keep more information aboutthe Views.
If you want to provide your own implementation but still use `super` methods to recordbasic information, you can override obtainHolderInfo to provide your owninstances.
-
-
Field Summary
Fields Modifier and Type Field Description public int
left
public int
top
public int
right
public int
bottom
public int
changeFlags
-
Constructor Summary
Constructors Constructor Description RecyclerView.ItemAnimator.ItemHolderInfo()
-
Method Summary
Modifier and Type Method Description RecyclerView.ItemAnimator.ItemHolderInfo
setFrom(@NonNull() RecyclerView.ViewHolder holder)
Sets the left, top, right and bottom values fromthe given ViewHolder. RecyclerView.ItemAnimator.ItemHolderInfo
setFrom(@NonNull() RecyclerView.ViewHolder holder, int flags)
Sets the left, top, right and bottom values fromthe given ViewHolder and sets the changeFlags to the given flags parameter. -
-
Method Detail
-
setFrom
@NonNull() RecyclerView.ItemAnimator.ItemHolderInfo setFrom(@NonNull() RecyclerView.ViewHolder holder)
Sets the left, top, right and bottom values fromthe given ViewHolder. Clears all changeFlags.
- Parameters:
holder
- The ViewHolder whose bounds should be copied.
-
setFrom
@NonNull() RecyclerView.ItemAnimator.ItemHolderInfo setFrom(@NonNull() RecyclerView.ViewHolder holder, int flags)
Sets the left, top, right and bottom values fromthe given ViewHolder and sets the changeFlags to the given flags parameter.
- Parameters:
holder
- The ViewHolder whose bounds should be copied.flags
- The adapter change flags that were passed intorecordPreLayoutInformation.
-
-
-
-