The second Android 11 Developer Preview is now available, test it out and share your feedback.

ExtensionCallback

interface ExtensionCallback
androidx.window.extensions.ExtensionInterface.ExtensionCallback

Callback that will be registered with the WindowManager library, and that the extension should use to report all state changes.

Summary

Public methods

abstract Unit
onDeviceStateChanged(@NonNull newDeviceState: ExtensionDeviceState)

Called by extension when the device state changes.

abstract Unit
onWindowLayoutChanged(@NonNull windowToken: IBinder, @NonNull newLayout: ExtensionWindowLayoutInfo)

Called by extension when the feature layout inside the window changes.

Public methods

onDeviceStateChanged

abstract fun onDeviceStateChanged(@NonNull newDeviceState: ExtensionDeviceState): Unit

Called by extension when the device state changes.

onWindowLayoutChanged

abstract fun onWindowLayoutChanged(
    @NonNull windowToken: IBinder,
    @NonNull newLayout: ExtensionWindowLayoutInfo
): Unit

Called by extension when the feature layout inside the window changes.