LayoutParams


open class LayoutParams
kotlin.Any
   ↳ android.view.SurfaceControlViewHost.LayoutParams

Specifies the layout parameters for a View hosted by a SurfaceControlViewHost. This is a subset of WindowManager.LayoutParams that are applicable for Views hosted by SurfaceControlViewHost.

Summary

Public constructors
LayoutParams(width: Int, height: Int, focusable: Boolean)

Creates a new set of layout parameters.

Public methods
open Int

Returns the height, in pixels, of the bounds for the View.

open String

open Int

Returns the width, in pixels, of the bounds for the View.

open Boolean

Returns true if this View can receive key input focus.

open Unit
setTitle(title: String)

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 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, View is focusable.

Parameters
width Int: The width, in pixels, of the bounds for the View.
height Int: The height, in pixels, of the bounds for the View.
focusable Boolean: Whether the View can receive key input focus.

Public methods

getHeight

open fun getHeight(): Int

Returns the height, in pixels, of the bounds for the View.

getTitle

open fun getTitle(): String
Return
String 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 View.

isFocusable

open fun isFocusable(): Boolean

Returns true if this 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: The title to set.
This value cannot be null.