# LayoutParams

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/view/SurfaceControlViewHost.LayoutParams "View this page in Java")

```
open class LayoutParams
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.view.SurfaceControlViewHost.LayoutParams](https://developer.android.com/reference/kotlin/android/view/SurfaceControlViewHost.LayoutParams#) |

Specifies the layout parameters for a `https://developer.android.com/reference/kotlin/android/view/View` hosted by a `https://developer.android.com/reference/kotlin/android/view/SurfaceControlViewHost`. This is a subset of `https://developer.android.com/reference/kotlin/android/view/WindowManager.LayoutParams` that are applicable for `https://developer.android.com/reference/kotlin/android/view/View`s hosted by `SurfaceControlViewHost`.

## Summary

| Public constructors ||
|---|---|
| `https://developer.android.com/reference/kotlin/android/view/SurfaceControlViewHost.LayoutParams#LayoutParams(kotlin.Int,%20kotlin.Int,%20kotlin.Boolean)(width: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html, height: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html, focusable: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)` Creates a new set of layout parameters. |

| Public methods ||
|---|---|
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/view/SurfaceControlViewHost.LayoutParams#getHeight()()` Returns the height, in pixels, of the bounds for the `https://developer.android.com/reference/kotlin/android/view/View`. |
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `https://developer.android.com/reference/kotlin/android/view/SurfaceControlViewHost.LayoutParams#getTitle()()` <br /> |
| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `https://developer.android.com/reference/kotlin/android/view/SurfaceControlViewHost.LayoutParams#getWidth()()` Returns the width, in pixels, of the bounds for the `https://developer.android.com/reference/kotlin/android/view/View`. |
| open [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | `https://developer.android.com/reference/kotlin/android/view/SurfaceControlViewHost.LayoutParams#isFocusable()()` Returns `true` if this `https://developer.android.com/reference/kotlin/android/view/View` can receive key input focus. |
| open [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `https://developer.android.com/reference/kotlin/android/view/SurfaceControlViewHost.LayoutParams#setTitle(kotlin.String)(title: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)` Sets the title for the SurfaceControlViewHost. |

## Public constructors

### LayoutParams

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

Creates a new set of layout parameters. If `focusable` is set to false, this `https://developer.android.com/reference/kotlin/android/view/View` won't ever get key input focus, so the user can not send key or other button events to it. Those will instead go to the current focused window. If set to true, `https://developer.android.com/reference/kotlin/android/view/View` is focusable.

| Parameters ||
|---|---|
| `width` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The width, in pixels, of the bounds for the `https://developer.android.com/reference/kotlin/android/view/View`. |
| `height` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): The height, in pixels, of the bounds for the `https://developer.android.com/reference/kotlin/android/view/View`. |
| `focusable` | [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html): Whether the `https://developer.android.com/reference/kotlin/android/view/View` can receive key input focus. |

## Public methods

### getHeight

```
open fun getHeight(): Int
```

Returns the height, in pixels, of the bounds for the `https://developer.android.com/reference/kotlin/android/view/View`.

### getTitle

```
open fun getTitle(): String
```

| Return ||
|---|---|
| `https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html` | The title for the SurfaceControlViewHost. This value cannot be `null`. |

### getWidth

```
open fun getWidth(): Int
```

Returns the width, in pixels, of the bounds for the `https://developer.android.com/reference/kotlin/android/view/View`.

### isFocusable

```
open fun isFocusable(): Boolean
```

Returns `true` if this `https://developer.android.com/reference/kotlin/android/view/View` can receive key input focus.

### setTitle

```
open fun setTitle(title: String): Unit
```

Sets the title for the SurfaceControlViewHost. This is used for debugging purposes to identify the SurfaceControl in tools.

| Parameters ||
|---|---|
| `title` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html): The title to set. This value cannot be `null`. |