1

Is it possible to auto hide the virtual keyboard after few seconds when idle in android device? how?

I am currently developing a application that would let the user search and the outcome will be displayed at the bottom of EditText. The problem here is the Virtual Keyboard eats almost half of the screen and to hide it i have to press "Back". My goal is to make it Auto Hide after 10-15 seconds at least when the device is not being used.

Have not tried it yet on a real device, i am only using emulator version 2.2.

Christian Eric Paran
  • 980
  • 6
  • 27
  • 49
  • Use a Timer + TimerTask to time 15 seconds, then hide the keyboard with the following: http://stackoverflow.com/questions/5360696/hide-virtual-keyboard-when-click-a-button This isn't a good question, you could've easily searched the separate parts. – Guykun Nov 06 '12 at 16:18
  • To go along with above: You'll also need some sort of text listener to restart the timer whenever the user actually uses the keyboard. – Otra Nov 06 '12 at 16:21
  • 1
    Also why? If the user brings up the keyboard, they're either searching for something, in which case the keyboard should vanish after they hit enter, or they've pressed it by mistake in which case they'll press back immediately rather than wait 10-15 seconds. I'm not sure why you need this, you might want to rethink the design. – Otra Nov 06 '12 at 16:23

0 Answers0