added in version 1.0.0
belongs to Maven artifact androidx.recyclerview:recyclerview:1.0.0-beta01

RecyclerView.ItemAnimator.ItemHolderInfo

public static class RecyclerView.ItemAnimator.ItemHolderInfo
extends Object

java.lang.Object
   ↳ androidx.recyclerview.widget.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 RecyclerView.ItemAnimator.recordPreLayoutInformation(RecyclerView.State, ViewHolder, int, List) and RecyclerView.ItemAnimator.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.

Summary

Fields

public int bottom

The bottom edge of the View (excluding decorations)

public int changeFlags

The change flags that were passed to RecyclerView.ItemAnimator.recordPreLayoutInformation(RecyclerView.State, ViewHolder, int, List).

public int left

The left edge of the View (excluding decorations)

public int right

The right edge of the View (excluding decorations)

public int top

The top edge of the View (excluding decorations)

Public constructors

RecyclerView.ItemAnimator.ItemHolderInfo()

Public methods

RecyclerView.ItemAnimator.ItemHolderInfo setFrom(RecyclerView.ViewHolder holder)

Sets the left, top, right and bottom values from the given ViewHolder.

RecyclerView.ItemAnimator.ItemHolderInfo setFrom(RecyclerView.ViewHolder holder, int flags)

Sets the left, top, right and bottom values from the given ViewHolder and sets the changeFlags to the given flags parameter.

Inherited methods

Fields

bottom

added in version 1.0.0
public int bottom

The bottom edge of the View (excluding decorations)

changeFlags

added in version 1.0.0
public int changeFlags

The change flags that were passed to RecyclerView.ItemAnimator.recordPreLayoutInformation(RecyclerView.State, ViewHolder, int, List).

left

added in version 1.0.0
public int left

The left edge of the View (excluding decorations)

right

added in version 1.0.0
public int right

The right edge of the View (excluding decorations)

top

added in version 1.0.0
public int top

The top edge of the View (excluding decorations)

Public constructors

RecyclerView.ItemAnimator.ItemHolderInfo

added in version 1.0.0
public RecyclerView.ItemAnimator.ItemHolderInfo ()

Public methods

setFrom

added in version 1.0.0
public RecyclerView.ItemAnimator.ItemHolderInfo setFrom (RecyclerView.ViewHolder holder)

Sets the left, top, right and bottom values from the given ViewHolder. Clears all changeFlags.

Parameters
holder RecyclerView.ViewHolder: The ViewHolder whose bounds should be copied.

Returns
RecyclerView.ItemAnimator.ItemHolderInfo This RecyclerView.ItemAnimator.ItemHolderInfo

setFrom

added in version 1.0.0
public RecyclerView.ItemAnimator.ItemHolderInfo setFrom (RecyclerView.ViewHolder holder, 
                int flags)

Sets the left, top, right and bottom values from the given ViewHolder and sets the changeFlags to the given flags parameter.

Parameters
holder RecyclerView.ViewHolder: The ViewHolder whose bounds should be copied.

flags int: The adapter change flags that were passed into RecyclerView.ItemAnimator.recordPreLayoutInformation(RecyclerView.State, ViewHolder, int, List).

Returns
RecyclerView.ItemAnimator.ItemHolderInfo This RecyclerView.ItemAnimator.ItemHolderInfo