SandboxedSdkViewUiInfo


public final class SandboxedSdkViewUiInfo


A class representing the UI state of a SandboxedSdkView.

Summary

Public constructors

SandboxedSdkViewUiInfo(
    int uiContainerWidth,
    int uiContainerHeight,
    @NonNull Rect onScreenGeometry,
    float uiContainerOpacityHint
)

Public methods

boolean
equals(Object other)
static final @NonNull SandboxedSdkViewUiInfo
final @NonNull Rect

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

final int

Returns the height of the UI container in pixels.

final float

Returns the opacity of the UI container, where available.

final int

Returns the width of the UI container in pixels.

int
static final @NonNull Bundle
toBundle(@NonNull SandboxedSdkViewUiInfo sandboxedSdkViewUiInfo)
@NonNull String

Public constructors

SandboxedSdkViewUiInfo

Added in 1.0.0-alpha12
public SandboxedSdkViewUiInfo(
    int uiContainerWidth,
    int uiContainerHeight,
    @NonNull Rect onScreenGeometry,
    float uiContainerOpacityHint
)

Public methods

equals

public boolean equals(Object other)

fromBundle

Added in 1.0.0-alpha12
public static final @NonNull SandboxedSdkViewUiInfo fromBundle(@NonNull Bundle bundle)

getOnScreenGeometry

Added in 1.0.0-alpha12
public final @NonNull Rect getOnScreenGeometry()

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.

getUiContainerHeight

Added in 1.0.0-alpha12
public final int getUiContainerHeight()

Returns the height of the UI container in pixels.

getUiContainerOpacityHint

Added in 1.0.0-alpha12
public final float getUiContainerOpacityHint()

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.

getUiContainerWidth

Added in 1.0.0-alpha12
public final int getUiContainerWidth()

Returns the width of the UI container in pixels.

hashCode

public int hashCode()

toBundle

Added in 1.0.0-alpha12
public static final @NonNull Bundle toBundle(@NonNull SandboxedSdkViewUiInfo sandboxedSdkViewUiInfo)

toString

public @NonNull String toString()