ViewCompat.OnUnhandledKeyEventListenerCompat

interface ViewCompat.OnUnhandledKeyEventListenerCompat


Interface definition for a callback to be invoked when a hardware key event hasn't been handled by the view hierarchy.

Summary

Public methods

abstract boolean

Called when a hardware key is dispatched to a view after being unhandled during normal KeyEvent dispatch.

Public methods

onUnhandledKeyEvent

abstract boolean onUnhandledKeyEvent(@NonNull View v, @NonNull KeyEvent event)

Called when a hardware key is dispatched to a view after being unhandled during normal KeyEvent dispatch.

Parameters
@NonNull View v

The view the key has been dispatched to.

@NonNull KeyEvent event

The KeyEvent object containing information about the event.

Returns
boolean

true if the listener has consumed the event, false otherwise.