WindowInfoRepository

interface WindowInfoRepository

Known direct subclasses
WindowInfoRepositoryCallbackAdapter

An adapted interface for WindowInfoRepository that allows listening for events via a callback shaped API.


An interface to provide all the relevant info about a android.view.Window.

Summary

Public fields

abstract @NonNull Flow<@NonNull WindowMetrics>

Returns a Flow for consuming the current WindowMetrics according to the current system state.

abstract @NonNull Flow<@NonNull WindowLayoutInfo>

A Flow of WindowLayoutInfo that contains all the available features.

Extension functions

final default @NonNull Flowable<@NonNull WindowMetrics>

Return a Flowable stream of WindowMetrics.

final default @NonNull Flowable<@NonNull WindowMetrics>

Return a Flowable stream of WindowMetrics.

final default @NonNull Observable<@NonNull WindowMetrics>

Return an Observable stream of WindowMetrics.

final default @NonNull Observable<@NonNull WindowMetrics>

Return an Observable stream of WindowMetrics.

final default @NonNull Flowable<@NonNull WindowLayoutInfo>

Return a Flowable stream of WindowLayoutInfo.

final default @NonNull Flowable<@NonNull WindowLayoutInfo>

Return a Flowable stream of WindowLayoutInfo.

final default @NonNull Observable<@NonNull WindowLayoutInfo>

Return an Observable stream of WindowLayoutInfo.

final default @NonNull Observable<@NonNull WindowLayoutInfo>

Return an Observable stream of WindowLayoutInfo.

Public fields

currentWindowMetrics

@NonNull
abstract @NonNull Flow<@NonNull WindowMetricscurrentWindowMetrics

Returns a Flow for consuming the current WindowMetrics according to the current system state.

The metrics describe the size of the area the window would occupy with MATCH_PARENT width and height and any combination of flags that would allow the window to extend behind display cutouts.

The value of this is based on the current windowing state of the system. For example, for activities in multi-window mode, the metrics returned are based on the current bounds that the user has selected for the Activity's window.

windowLayoutInfo

@NonNull
abstract @NonNull Flow<@NonNull WindowLayoutInfowindowLayoutInfo

A Flow of WindowLayoutInfo that contains all the available features.

Extension functions

WindowInfoRepositoryRx.currentWindowMetricsFlowable

@NonNull
final default Flowable<@NonNull WindowMetricsWindowInfoRepositoryRx.currentWindowMetricsFlowable(
    @NonNull WindowInfoRepository receiver
)

Return a Flowable stream of WindowMetrics.

WindowInfoRepositoryRx.currentWindowMetricsFlowable

@NonNull
final default Flowable<@NonNull WindowMetricsWindowInfoRepositoryRx.currentWindowMetricsFlowable(
    @NonNull WindowInfoRepository receiver
)

Return a Flowable stream of WindowMetrics.