Added in API level 17

DisplayListener


interface DisplayListener
android.hardware.display.DisplayManager.DisplayListener

Listens for changes in available display devices.

Summary

Public methods
abstract Unit
onDisplayAdded(displayId: Int)

Called whenever a logical display has been added to the system.

abstract Unit
onDisplayChanged(displayId: Int)

Called whenever the properties of a logical android.view.Display, such as size and density, have changed.

abstract Unit
onDisplayRemoved(displayId: Int)

Called whenever a logical display has been removed from the system.

Public methods

onDisplayAdded

Added in API level 17
abstract fun onDisplayAdded(displayId: Int): Unit

Called whenever a logical display has been added to the system. Use DisplayManager#getDisplay to get more information about the display.

Parameters
displayId Int: The id of the logical display that was added.

onDisplayChanged

Added in API level 17
abstract fun onDisplayChanged(displayId: Int): Unit

Called whenever the properties of a logical android.view.Display, such as size and density, have changed.

Parameters
displayId Int: The id of the logical display that changed.

onDisplayRemoved

Added in API level 17
abstract fun onDisplayRemoved(displayId: Int): Unit

Called whenever a logical display has been removed from the system.

Parameters
displayId Int: The id of the logical display that was removed.