Google se compromete a impulsar la igualdad racial para las comunidades afrodescendientes. Obtén información al respecto.

LayoutParams

open class LayoutParams : MarginLayoutParams
kotlin.Any
   ↳ android.view.ViewGroup.LayoutParams
   ↳ android.view.ViewGroup.MarginLayoutParams
   ↳ androidx.recyclerview.widget.RecyclerView.LayoutParams

LayoutParams subclass for children of RecyclerView. Custom layout managers are encouraged to create their own subclass of this LayoutParams class to store any additional required per-child view metadata about the layout.

Summary

Public constructors
<init>(c: Context!, attrs: AttributeSet!)

<init>(width: Int, height: Int)

<init>(source: LayoutParams!)

Public methods
open Int

Returns the up-to-date adapter position that the view this LayoutParams is attached to corresponds to in the RecyclerView.

open Int

Returns the up-to-date adapter position that the view this LayoutParams is attached to corresponds to with respect to the Adapter that bound this View.

open Int

open Int

Returns the adapter position that the view this LayoutParams is attached to corresponds to as of latest layout calculation.

open Int

open Boolean

Returns true if the adapter data item corresponding to the view this LayoutParams is attached to has been changed in the data set.

open Boolean

Returns true if the adapter data item corresponding to the view this LayoutParams is attached to has been removed from the data set.

open Boolean

Returns true if the view this LayoutParams is attached to is now representing potentially invalid data.

open Boolean

Returns true if the view this LayoutParams is attached to needs to have its content updated from the corresponding adapter.

Public constructors

<init>

LayoutParams(
    c: Context!,
    attrs: AttributeSet!)

<init>

LayoutParams(
    width: Int,
    height: Int)

<init>

LayoutParams(source: MarginLayoutParams!)

<init>

LayoutParams(source: LayoutParams!)

<init>

LayoutParams(source: RecyclerView.LayoutParams!)

Public methods

getAbsoluteAdapterPosition

open fun getAbsoluteAdapterPosition(): Int

Returns the up-to-date adapter position that the view this LayoutParams is attached to corresponds to in the RecyclerView. If the RecyclerView has an Adapter that merges other adapters, this position will be with respect to the adapter that is assigned to the RecyclerView.

Return
Int the up-to-date adapter position this view with respect to the RecyclerView. It may return RecyclerView#NO_POSITION if item represented by this View has been removed or its up-to-date position cannot be calculated.

getBindingAdapterPosition

open fun getBindingAdapterPosition(): Int

Returns the up-to-date adapter position that the view this LayoutParams is attached to corresponds to with respect to the Adapter that bound this View.

Return
Int the up-to-date adapter position this view relative to the Adapter that bound this View. It may return RecyclerView#NO_POSITION if item represented by this View has been removed or its up-to-date position cannot be calculated.

getViewAdapterPosition

open fun getViewAdapterPosition(): Int

Deprecated: This method is confusing when nested adapters are used. If you are calling from the context of an Adapter, use getBindingAdapterPosition(). If you need the position that RecyclerView sees, use getAbsoluteAdapterPosition().