Skip to content Skip to sidebar Skip to footer

Which Interface Is Used To Detect Key Events From The Dialog Class (android Sdk)?

I've created a simple custom dialog that asks users to 'Press a key'. The purpose of this is so that I can map whatever key they press to a function in the app. Unfortunately, I

Solution 1:

You never declared the dialog to listen to the keys.

Example:

this.setOnKeyListener(...)

the this keyword is referring to the class that it is in.. which is a Dialog.

Post a Comment for "Which Interface Is Used To Detect Key Events From The Dialog Class (android Sdk)?"