# BaseCardView.LayoutParams

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

*** ** * ** ***


```
public class BaseCardView.LayoutParams extends FrameLayout.LayoutParams
```

<br />

|---|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.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) |||
|   |   | ↳ | [android.widget.FrameLayout.LayoutParams](https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html) ||
|   |   |   | ↳ | [androidx.leanback.widget.BaseCardView.LayoutParams](https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams) |

*** ** * ** ***

Per-child layout information associated with BaseCardView.

## Summary

| ### Constants |
|---|---|
| `static final int` | `https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams#VIEW_TYPE_EXTRA() = 2` |
| `static final int` | `https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams#VIEW_TYPE_INFO() = 1` |
| `static final int` | `https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams#VIEW_TYPE_MAIN() = 0` |

| ### Public fields |
|---|---|
| `int` | `@https://developer.android.com/reference/android/view/ViewDebug.ExportedProperty.html(category = "layout", mapping = [@https://developer.android.com/reference/android/view/ViewDebug.IntToString.html(from = 0, to = "MAIN"), @https://developer.android.com/reference/android/view/ViewDebug.IntToString.html(from = 1, to = "INFO"), @https://developer.android.com/reference/android/view/ViewDebug.IntToString.html(from = 2, to = "EXTRA")]) https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams#viewType()` Card component type for the view associated with these LayoutParams. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams#LayoutParams(android.view.ViewGroup.LayoutParams)(https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html p)` |
| `https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams#LayoutParams(androidx.leanback.widget.BaseCardView.LayoutParams)(https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams source)` Copy constructor. |
| `https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams#LayoutParams(android.content.Context,android.util.AttributeSet)(https://developer.android.com/reference/android/content/Context.html c, https://developer.android.com/reference/android/util/AttributeSet.html attrs)` |
| `https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams#LayoutParams(int,int)(int width, int height)` |

| ### Inherited Constants |
|---|
| From [android.widget.FrameLayout.LayoutParams](https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html) |---|---| | `static final int` | `https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html#UNSPECIFIED_GRAVITY = -1` | |
| From [android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) |---|---| | `static final int` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#FILL_PARENT = -1` **This field is deprecated.** | | `static final int` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#MATCH_PARENT = -1` | | `static final int` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT = -2` | |

| ### Inherited fields |
|---|
| From [android.widget.FrameLayout.LayoutParams](https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html) |---|---| | `int` | `https://developer.android.com/reference/android/widget/FrameLayout.LayoutParams.html#gravity` | |
| From [android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) |---|---| | `int` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#height` | | `https://developer.android.com/reference/android/view/animation/LayoutAnimationController.AnimationParameters.html` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#layoutAnimationParameters` | | `int` | `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://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#bottomMargin` | | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#leftMargin` | | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#rightMargin` | | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#topMargin` | |

| ### Inherited methods |
|---|
| From [android.view.ViewGroup.LayoutParams](https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html) |---|---| | `void` | `https://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#setBaseAttributes(android.content.res.TypedArray, int, int)(https://developer.android.com/reference/android/content/res/TypedArray.html a, int widthAttr, int heightAttr)` | |
| From [android.view.ViewGroup.MarginLayoutParams](https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html) |---|---| | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getLayoutDirection()()` | | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginEnd()()` | | `int` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#getMarginStart()()` | | `boolean` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#isMarginRelative()()` | | `void` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#resolveLayoutDirection(int)(int layoutDirection)` | | `void` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setLayoutDirection(int)(int layoutDirection)` | | `void` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMarginEnd(int)(int end)` | | `void` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMarginStart(int)(int start)` | | `void` | `https://developer.android.com/reference/android/view/ViewGroup.MarginLayoutParams.html#setMargins(int, int, int, int)(int left, int top, int right, int bottom)` | |

## Constants

### VIEW_TYPE_EXTRA

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

```
public static final int VIEW_TYPE_EXTRA = 2
```

### VIEW_TYPE_INFO

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

```
public static final int VIEW_TYPE_INFO = 1
```

### VIEW_TYPE_MAIN

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

```
public static final int VIEW_TYPE_MAIN = 0
```

## Public fields

### viewType

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

```
@ViewDebug.ExportedProperty(category = "layout", mapping = [@ViewDebug.IntToString(from = 0, to = "MAIN"), @ViewDebug.IntToString(from = 1, to = "INFO"), @ViewDebug.IntToString(from = 2, to = "EXTRA")])
public int viewType
```

Card component type for the view associated with these LayoutParams.

## Public constructors

### LayoutParams

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

```
public LayoutParams(ViewGroup.LayoutParams p)
```

### LayoutParams

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

```
public LayoutParams(BaseCardView.LayoutParams source)
```

Copy constructor. Clones the width, height, and View Type of the source.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/leanback/widget/BaseCardView.LayoutParams source` | The layout params to copy from. |

### LayoutParams

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

```
public LayoutParams(Context c, AttributeSet attrs)
```

### LayoutParams

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

```
public LayoutParams(int width, int height)
```