# SlidingPaneLayout.LayoutParams

# SlidingPaneLayout.LayoutParams

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

*** ** * ** ***

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

<br />

```
class SlidingPaneLayout.LayoutParams : ViewGroup.MarginLayoutParams
```

<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.slidingpanelayout.widget.SlidingPaneLayout.LayoutParams](https://developer.android.com/reference/kotlin/androidx/slidingpanelayout/widget/SlidingPaneLayout.LayoutParams) |

*** ** * ** ***

## Summary

|                                                                                                                                                                                  ### Public constructors                                                                                                                                                                                  |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [LayoutParams](https://developer.android.com/reference/kotlin/androidx/slidingpanelayout/widget/SlidingPaneLayout.LayoutParams#LayoutParams())`()`                                                                                                                                                                                                                                        |
| [LayoutParams](https://developer.android.com/reference/kotlin/androidx/slidingpanelayout/widget/SlidingPaneLayout.LayoutParams#LayoutParams(androidx.slidingpanelayout.widget.SlidingPaneLayout.LayoutParams))`(source: `[SlidingPaneLayout.LayoutParams](https://developer.android.com/reference/kotlin/androidx/slidingpanelayout/widget/SlidingPaneLayout.LayoutParams)`)`             |
| [LayoutParams](https://developer.android.com/reference/kotlin/androidx/slidingpanelayout/widget/SlidingPaneLayout.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/slidingpanelayout/widget/SlidingPaneLayout.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/slidingpanelayout/widget/SlidingPaneLayout.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/slidingpanelayout/widget/SlidingPaneLayout.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 properties                              |
|---------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [weight](https://developer.android.com/reference/kotlin/androidx/slidingpanelayout/widget/SlidingPaneLayout.LayoutParams#weight()) The weighted proportion of how much of the leftover space this child should consume after measurement. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   ### 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[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())       |                                                                                                                                                                                                                                     |

## Public constructors

### LayoutParams

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

```
LayoutParams()
```  

### LayoutParams

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

```
LayoutParams(source: SlidingPaneLayout.LayoutParams)
```  

### LayoutParams

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

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

### LayoutParams

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

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

### LayoutParams

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

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

### LayoutParams

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

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

## Public properties

### weight

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

```
val weight: Float
```

The weighted proportion of how much of the leftover space this child should consume after measurement.