public static class RecyclerView.ItemAnimator.ItemHolderInfo extends Object
#recordPreLayoutInformation(RecyclerView.State, ViewHolder, int, List)
and
#recordPostLayoutInformation(RecyclerView.State, ViewHolder)
returns this data
structure. You can extend this class if you would like to keep more information about
the Views.
If you want to provide your own implementation but still use `super` methods to record
basic information, you can override RecyclerView.ItemAnimator.obtainHolderInfo()
to provide your own
instances.
Modifier and Type | Field and Description |
---|---|
int |
bottom
The bottom edge of the View (excluding decorations)
|
int |
changeFlags
The change flags that were passed to
#recordPreLayoutInformation(RecyclerView.State, ViewHolder, int, List) . |
int |
left
The left edge of the View (excluding decorations)
|
int |
right
The right edge of the View (excluding decorations)
|
int |
top
The top edge of the View (excluding decorations)
|
Constructor and Description |
---|
ItemHolderInfo() |
Modifier and Type | Method and Description |
---|---|
RecyclerView.ItemAnimator.ItemHolderInfo |
setFrom(RecyclerView.ViewHolder holder)
|
RecyclerView.ItemAnimator.ItemHolderInfo |
setFrom(RecyclerView.ViewHolder holder,
int flags)
Sets the
left , top , right and bottom values from
the given ViewHolder and sets the KeyEvent.changeFlags(android.view.KeyEvent, int) to the given flags parameter. |
public int left
public int top
public int right
public int bottom
public int changeFlags
#recordPreLayoutInformation(RecyclerView.State, ViewHolder, int, List)
.public RecyclerView.ItemAnimator.ItemHolderInfo setFrom(RecyclerView.ViewHolder holder)
left
, top
, right
and bottom
values from
the given ViewHolder. Clears all KeyEvent.changeFlags(android.view.KeyEvent, int)
.holder
- The ViewHolder whose bounds should be copied.RecyclerView.ItemAnimator.ItemHolderInfo
public RecyclerView.ItemAnimator.ItemHolderInfo setFrom(RecyclerView.ViewHolder holder, int flags)
left
, top
, right
and bottom
values from
the given ViewHolder and sets the KeyEvent.changeFlags(android.view.KeyEvent, int)
to the given flags parameter.holder
- The ViewHolder whose bounds should be copied.flags
- The adapter change flags that were passed into
#recordPreLayoutInformation(RecyclerView.State, ViewHolder, int,
List)
.RecyclerView.ItemAnimator.ItemHolderInfo