WindowAreaInfo
@ExperimentalWindowApi
public final class WindowAreaInfo
The current state of a window area. The WindowAreaInfo can represent a part of or an entire display in the system. These values can be used to modify the UI to show/hide controls and determine when features can be enabled.
Summary
Nested types |
|---|
@ExperimentalWindowApiRepresents a type of |
Public methods |
|
|---|---|
boolean |
|
final WindowAreaSession |
getActiveSession(@NonNull WindowAreaCapability.Operation operation)Returns the current active |
final @NonNull WindowAreaCapability |
getCapability(@NonNull WindowAreaCapability.Operation operation)Returns the |
final @NonNull WindowMetrics |
The |
final @NonNull Binder |
getToken()
|
final @NonNull WindowAreaInfo.Type |
getType()The |
int |
hashCode() |
final void |
setMetrics(@NonNull WindowMetrics metrics)The |
@NonNull String |
toString() |
Public methods
getActiveSession
public final WindowAreaSession getActiveSession(@NonNull WindowAreaCapability.Operation operation)
Returns the current active WindowAreaSession is one is currently active for the provided operation
| Throws | |
|---|---|
kotlin.IllegalStateException |
if there is no active session for the provided |
getCapability
public final @NonNull WindowAreaCapability getCapability(@NonNull WindowAreaCapability.Operation operation)
Returns the WindowAreaCapability corresponding to the operation provided. If this WindowAreaCapability does not exist for this WindowAreaInfo, a WindowAreaCapability with a WINDOW_AREA_STATUS_UNSUPPORTED value is returned.
getMetrics
public final @NonNull WindowMetrics getMetrics()
The WindowMetrics that represent the size of the area. Used to determine if the behavior desired fits the size of the window area available.
getToken
public final @NonNull Binder getToken()
Binder token to identify the specific WindowArea
getType
public final @NonNull WindowAreaInfo.Type getType()
The Type of this window area
setMetrics
public final void setMetrics(@NonNull WindowMetrics metrics)
The WindowMetrics that represent the size of the area. Used to determine if the behavior desired fits the size of the window area available.