SandboxedSdkViewUiInfo


class SandboxedSdkViewUiInfo


A class representing the UI state of a SandboxedSdkView.

Summary

Public companion functions

SandboxedSdkViewUiInfo
fromBundle(bundle: Bundle)
Bundle
toBundle(sandboxedSdkViewUiInfo: SandboxedSdkViewUiInfo)

Public constructors

SandboxedSdkViewUiInfo(
    uiContainerWidth: Int,
    uiContainerHeight: Int,
    onScreenGeometry: Rect,
    uiContainerOpacityHint: Float,
    obstructedGeometry: List<Rect>
)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

List<Rect>

Returns the list of coordinate rectangles, relative to the UI container, that are obstructed.

Rect

Returns the portion of the UI container which is not clipped by parent views and is visible on screen.

Int

Returns the height of the UI container in pixels.

Float

Returns the opacity of the UI container, where available.

Int

Returns the width of the UI container in pixels.

Public companion functions

fromBundle

Added in 1.0.0-alpha16
fun fromBundle(bundle: Bundle): SandboxedSdkViewUiInfo

toBundle

Added in 1.0.0-alpha16
fun toBundle(sandboxedSdkViewUiInfo: SandboxedSdkViewUiInfo): Bundle

Public constructors

SandboxedSdkViewUiInfo

Added in 1.0.0-alpha16
SandboxedSdkViewUiInfo(
    uiContainerWidth: Int,
    uiContainerHeight: Int,
    onScreenGeometry: Rect,
    uiContainerOpacityHint: Float,
    obstructedGeometry: List<Rect>
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

obstructedGeometry

Added in 1.0.0-alpha16
val obstructedGeometryList<Rect>

Returns the list of coordinate rectangles, relative to the UI container, that are obstructed.

The container may be considered to be obstructed by another UI element if that UI element overlaps with the container, is displayed on top of it, and is not transparent. Ancestor views and children views will not be considered as obstructing the container. If the container's window is placed above the client window, no obstructions will be reported.

The coordinates of each obstruction in this list are relative to the UI container, and measured in pixels. The rectangles may overlap each other.

This value will only be non-empty if SandboxedUiAdapterSignalOptions.OBSTRUCTIONS is set on the SessionObserverFactory associated with the UI container's SandboxedUiAdapter. Otherwise, this will return an empty list irrespective of any obstructions on the container.

onScreenGeometry

Added in 1.0.0-alpha16
val onScreenGeometryRect

Returns the portion of the UI container which is not clipped by parent views and is visible on screen. The coordinates of this Rect are relative to the UI container and measured in pixels.

If none of the UI container is visible on screen, each coordinate in this Rect will be -1.

uiContainerHeight

Added in 1.0.0-alpha16
val uiContainerHeightInt

Returns the height of the UI container in pixels.

uiContainerOpacityHint

Added in 1.0.0-alpha16
val uiContainerOpacityHintFloat

Returns the opacity of the UI container, where available.

When available, this is a value from 0 to 1, where 0 means the container is completely transparent and 1 means the container is completely opaque. This value doesn't necessarily reflect the user-visible opacity of the UI container, as shaders and other overlays can affect that.

When the opacity is not available, the value will be -1.

uiContainerWidth

Added in 1.0.0-alpha16
val uiContainerWidthInt

Returns the width of the UI container in pixels.