SandboxedSdkViewUiInfo
public final class SandboxedSdkViewUiInfo
A class representing the UI state of a SandboxedSdkView.
Summary
Public constructors |
|---|
This method is deprecated. This library is no longer supported. |
Public methods |
|
|---|---|
boolean |
This method is deprecated. This library is no longer supported. |
static final @NonNull SandboxedSdkViewUiInfo |
This method is deprecated. This library is no longer supported. |
final @NonNull List<@NonNull Rect> |
This method is deprecated. This library is no longer supported. |
final @NonNull Rect |
This method is deprecated. This library is no longer supported. |
final int |
This method is deprecated. This library is no longer supported. |
final float |
This method is deprecated. This library is no longer supported. |
final int |
This method is deprecated. This library is no longer supported. |
int |
This method is deprecated. This library is no longer supported. |
static final @NonNull Bundle |
This method is deprecated. This library is no longer supported. |
@NonNull String |
This method is deprecated. This library is no longer supported. |
Public constructors
SandboxedSdkViewUiInfo
publicSandboxedSdkViewUiInfo(
int uiContainerWidth,
int uiContainerHeight,
@NonNull Rect onScreenGeometry,
float uiContainerOpacityHint,
@NonNull List<@NonNull Rect> obstructedGeometry
)
Public methods
fromBundle
public static final @NonNull SandboxedSdkViewUiInfofromBundle(@NonNull Bundle bundle)
getObstructedGeometry
public final @NonNull List<@NonNull Rect>getObstructedGeometry()
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.
getOnScreenGeometry
public final @NonNull RectgetOnScreenGeometry()
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
public final int getUiContainerHeight()Returns the height of the UI container in pixels.
getUiContainerOpacityHint
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
public final int getUiContainerWidth()Returns the width of the UI container in pixels.
toBundle
public static final @NonNull BundletoBundle(@NonNull SandboxedSdkViewUiInfo sandboxedSdkViewUiInfo)