public class

RecyclerView.ItemAnimator.ItemHolderInfo

extends java.lang.Object

 java.lang.Object

↳androidx.recyclerview.widget.RecyclerView.ItemAnimator.ItemHolderInfo

Overview

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.ItemHolderInfo and RecyclerView.ItemAnimator.ItemHolderInfo 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 intbottom

The bottom edge of the View (excluding decorations)

public intchangeFlags

The change flags that were passed to RecyclerView.ItemAnimator.ItemHolderInfo.

public intleft

The left edge of the View (excluding decorations)

public intright

The right edge of the View (excluding decorations)

public inttop

The top edge of the View (excluding decorations)

Constructors
publicItemHolderInfo()

Methods
public RecyclerView.ItemAnimator.ItemHolderInfosetFrom(RecyclerView.ViewHolder holder)

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

public RecyclerView.ItemAnimator.ItemHolderInfosetFrom(RecyclerView.ViewHolder holder, int flags)

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

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public int left

The left edge of the View (excluding decorations)

public int top

The top edge of the View (excluding decorations)

public int right

The right edge of the View (excluding decorations)

public int bottom

The bottom edge of the View (excluding decorations)

public int changeFlags

The change flags that were passed to RecyclerView.ItemAnimator.ItemHolderInfo.

Constructors

public ItemHolderInfo()

Methods

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

Parameters:

holder: The ViewHolder whose bounds should be copied.

Returns:

This RecyclerView.ItemAnimator.ItemHolderInfo

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

Parameters:

holder: The ViewHolder whose bounds should be copied.
flags: The adapter change flags that were passed into RecyclerView.ItemAnimator.ItemHolderInfo.

Returns:

This RecyclerView.ItemAnimator.ItemHolderInfo