# StaggeredGridLayoutManager.LayoutParams

# StaggeredGridLayoutManager.LayoutParams

Artifact:[androidx.recyclerview:recyclerview](https://developer.android.com/jetpack/androidx/releases/recyclerview)  
[View Source](https://cs.android.com/search?q=file:androidx/recyclerview/widget/StaggeredGridLayoutManager.java+class:androidx.recyclerview.widget.StaggeredGridLayoutManager.LayoutParams)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams "View this page in Java")

<br />

```
class StaggeredGridLayoutManager.LayoutParams : RecyclerView.LayoutParams
```

<br />

|---|---|---|---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                                                                                      |||||
| ↳ | [android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)                                                                              ||||
|   | ↳ | [android.view.ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)                                                               |||
|   |   | ↳ | [androidx.recyclerview.widget.RecyclerView.LayoutParams](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams)                                ||
|   |   |   | ↳ | [androidx.recyclerview.widget.StaggeredGridLayoutManager.LayoutParams](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams) |

*** ** * ** ***

LayoutParams used by StaggeredGridLayoutManager.

Note that if the orientation is[VERTICAL](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager#VERTICAL()), the width parameter is ignored and if the orientation is[HORIZONTAL](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager#HORIZONTAL())the height parameter is ignored because child view is expected to fill all of the space given to it.

## Summary

|                                    ### Constants                                    |
|-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [INVALID_SPAN_ID](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#INVALID_SPAN_ID())` = -1` Span Id for Views that are not laid out yet. |

|                                                                                                                                                                                    ### Public constructors                                                                                                                                                                                     |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [LayoutParams](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#LayoutParams(androidx.recyclerview.widget.RecyclerView.LayoutParams))`(source: `[RecyclerView.LayoutParams](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams)`!)`                                      |
| [LayoutParams](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#LayoutParams(android.view.ViewGroup.LayoutParams))`(source: `[ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html)`!)`                                                                                 |
| [LayoutParams](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#LayoutParams(android.view.ViewGroup.MarginLayoutParams))`(source: `[ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html)`!)`                                                               |
| [LayoutParams](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#LayoutParams(android.content.Context,android.util.AttributeSet))`(c: `[Context](https://developer.android.com/reference/android/content/Context.html)`!, attrs: `[AttributeSet](https://developer.android.com/reference/android/util/AttributeSet.html)`!)` |
| [LayoutParams](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#LayoutParams(int,int))`(width: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, height: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                       |

|                                ### Public functions                                 |
|-------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getSpanIndex](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#getSpanIndex())`()` Returns the Span index to which this View is assigned.                                                                                                          |
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [isFullSpan](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#isFullSpan())`()` Returns whether this View occupies all available spans or just one.                                                                                                 |
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [setFullSpan](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#setFullSpan(boolean))`(fullSpan: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`)` When set to true, the item will layout using all span area. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ### Inherited Constants                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) |-------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------| | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [FILL_PARENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#FILL_PARENT())` = -1` **This property is deprecated.** | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [MATCH_PARENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT())` = -1`                                | | `const `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [WRAP_CONTENT](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT())` = -2`                                | |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.recyclerview.widget.RecyclerView.LayoutParams](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams) |-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getAbsoluteAdapterPosition](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#getAbsoluteAdapterPosition())`()` Returns the up-to-date adapter position that the view this LayoutParams is attached to corresponds to in the[RecyclerView](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView).                                                                                                                     | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getBindingAdapterPosition](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#getBindingAdapterPosition())`()` Returns the up-to-date adapter position that the view this LayoutParams is attached to corresponds to with respect to the[Adapter](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter)that bound this View.                                                                                   | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | ~~[getViewAdapterPosition](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#getViewAdapterPosition())~~`()` **This function is deprecated.** This method is confusing when nested adapters are used. <br />                                                                                                                                                                                                                                               | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getViewLayoutPosition](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#getViewLayoutPosition())`()` Returns the adapter position that the view this LayoutParams is attached to corresponds to as of latest layout calculation.                                                                                                                                                                                                                         | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | ~~[getViewPosition](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#getViewPosition())~~`()` **This function is deprecated.** use[getViewLayoutPosition](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#getViewLayoutPosition())or[getViewAdapterPosition](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#getViewAdapterPosition()) <br /> | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [isItemChanged](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#isItemChanged())`()` Returns true if the adapter data item corresponding to the view this LayoutParams is attached to has been changed in the data set.                                                                                                                                                                                                                                  | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [isItemRemoved](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#isItemRemoved())`()` Returns true if the adapter data item corresponding to the view this LayoutParams is attached to has been removed from the data set.                                                                                                                                                                                                                                | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [isViewInvalid](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#isViewInvalid())`()` Returns true if the view this LayoutParams is attached to is now representing potentially invalid data.                                                                                                                                                                                                                                                             | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [viewNeedsUpdate](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.LayoutParams#viewNeedsUpdate())`()` Returns true if the view this LayoutParams is attached to needs to have its content updated from the corresponding adapter.                                                                                                                                                                                                                                     | |
| From[android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) |-------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [setBaseAttributes](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#setBaseAttributes(android.content.res.TypedArray, int, int))`(a: `[TypedArray](https://developer.android.com/reference/android/content/res/TypedArray.html)`!, widthAttr: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, heightAttr: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| From[android.view.ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html) |-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getLayoutDirection](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getLayoutDirection())`()`                                                                                                                                                                                                                                                                                                                                                       | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getMarginEnd](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginEnd())`()`                                                                                                                                                                                                                                                                                                                                                                   | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)         | [getMarginStart](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginStart())`()`                                                                                                                                                                                                                                                                                                                                                               | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [isMarginRelative](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#isMarginRelative())`()`                                                                                                                                                                                                                                                                                                                                                           | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [resolveLayoutDirection](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#resolveLayoutDirection(int))`(layoutDirection: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [setLayoutDirection](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setLayoutDirection(int))`(layoutDirection: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                                                      | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [setMarginEnd](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMarginEnd(int))`(end: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                                                                              | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [setMarginStart](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMarginStart(int))`(start: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)`                                                                                                                                                                                                                                                                        | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [setMargins](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMargins(int, int, int, int))`(left: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, top: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, right: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`, bottom: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` |                                                                                                                                                                                                                           |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ### Inherited properties                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                           | [height](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#height())                                       | | [LayoutAnimationController.AnimationParameters](https://developer.android.com/reference/android/view/animation/LayoutAnimationController.AnimationParameters.html)`!` | [layoutAnimationParameters](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#layoutAnimationParameters()) | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)                                                                                           | [width](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#width())                                         | |
| From[android.view.ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html) |-----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------| | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [bottomMargin](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#bottomMargin()) | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [leftMargin](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#leftMargin())     | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [rightMargin](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#rightMargin())   | | [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [topMargin](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#topMargin())       |                                                                                                                                                                                                                                     |

## Constants

### INVALID_SPAN_ID

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
const val INVALID_SPAN_ID = -1: Int
```

Span Id for Views that are not laid out yet.  

## Public constructors

### LayoutParams

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.4.0)  

```
LayoutParams(source: RecyclerView.LayoutParams!)
```  

### LayoutParams

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.4.0)  

```
LayoutParams(source: ViewGroup.LayoutParams!)
```  

### LayoutParams

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.4.0)  

```
LayoutParams(source: ViewGroup.MarginLayoutParams!)
```  

### LayoutParams

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.4.0)  

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

### LayoutParams

Added in[1.4.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.4.0)  

```
LayoutParams(width: Int, height: Int)
```  

## Public functions

### getSpanIndex

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun getSpanIndex(): Int
```

Returns the Span index to which this View is assigned.  

|                                   Returns                                   |
|-----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | The Span index of the View. If View is not yet assigned to any span, returns[INVALID_SPAN_ID](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#INVALID_SPAN_ID()). |

### isFullSpan

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun isFullSpan(): Boolean
```

Returns whether this View occupies all available spans or just one.  

|                                       Returns                                       |
|-------------------------------------------------------------------------------------|---------------------------------------------------------|
| [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | True if the View occupies all spans or false otherwise. |

|                                                                        See also                                                                         |
|---------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [setFullSpan](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#setFullSpan(boolean)) |   |

### setFullSpan

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/recyclerview#1.0.0)  

```
fun setFullSpan(fullSpan: Boolean): Unit
```

When set to true, the item will layout using all span area. That means, if orientation is vertical, the view will have full width; if orientation is horizontal, the view will have full height.  

|                                           Parameters                                            |
|-------------------------------------------------------------------------------------------------|----------------------------------------------|
| `fullSpan: `[Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | True if this item should traverse all spans. |

|                                                                    See also                                                                    |
|------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [isFullSpan](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/StaggeredGridLayoutManager.LayoutParams#isFullSpan()) |   |