InputDeviceListener
interface InputDeviceListener
android.hardware.input.InputManager.InputDeviceListener |
Listens for changes in input devices.
Summary
Public methods | |
---|---|
abstract Unit |
onInputDeviceAdded(deviceId: Int) Called whenever an input device has been added to the system. |
abstract Unit |
onInputDeviceChanged(deviceId: Int) Called whenever the properties of an input device have changed since they were last queried. |
abstract Unit |
onInputDeviceRemoved(deviceId: Int) Called whenever an input device has been removed from the system. |
Public methods
onInputDeviceAdded
abstract fun onInputDeviceAdded(deviceId: Int): Unit
Called whenever an input device has been added to the system. Use getInputDevice(int)
to get more information about the device.
Parameters | |
---|---|
deviceId |
Int: The id of the input device that was added. |
onInputDeviceChanged
abstract fun onInputDeviceChanged(deviceId: Int): Unit
Called whenever the properties of an input device have changed since they were last queried. Use InputManager.getInputDevice
to get a fresh InputDevice
object with the new properties.
Parameters | |
---|---|
deviceId |
Int: The id of the input device that changed. |
onInputDeviceRemoved
abstract fun onInputDeviceRemoved(deviceId: Int): Unit
Called whenever an input device has been removed from the system.
Parameters | |
---|---|
deviceId |
Int: The id of the input device that was removed. |