1

For my Android app I need to show numeric keyboard when the user clicks on an image, but without showing an EditText. I want to then be notified when the user pressed a specific key, so that I can handle UI appropiately.

How could it be done? Thank you

Ernestina Juan
  • 957
  • 1
  • 9
  • 24

1 Answers1

2

Try this...

InputMethodManager inputMethodManager =  (InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
inputMethodManager.toggleSoftInputFromWindow(imageview_reference.getApplicationWindowToken(),     InputMethodManager.SHOW_FORCED, 0);