[ Web Proxy ]
URL:
Viewing: https://developer.android.com/reference/android/view/SurfaceControlViewHost.LayoutParams [Back]  [Original]

SurfaceControlViewHost.LayoutParams  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.

SurfaceControlViewHost.LayoutParams


public static class SurfaceControlViewHost.LayoutParams
extends Object

java.lang.Object
   ↳ 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(int width, int height, boolean focusable)

Creates a new set of layout parameters.

Public methods

int getHeight()

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

String getTitle()
int getWidth()

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

boolean isFocusable()

Returns true if this View can receive key input focus.

void setTitle(String title)

Sets the title for the SurfaceControlViewHost.

Inherited methods

Public constructors

LayoutParams

Added in API level 37
public LayoutParams (int width, 
                int height, 
                boolean focusable)

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

Added in API level 37
public int getHeight ()

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

Returns
int

getTitle

Added in API level 37
public String getTitle ()

Returns
String The title for the SurfaceControlViewHost.
This value cannot be null.

getWidth

Added in API level 37
public int getWidth ()

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

Returns
int

isFocusable

Added in API level 37
public boolean isFocusable ()

Returns true if this View can receive key input focus.

Returns
boolean

setTitle

Added in API level 37
public void setTitle (String title)

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.

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026-08-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page