2

I am working on a soft keyboard for android based on the sample softkeyboard (i know its old but its all i have to work on) and using code similar to the following

<Key android:codes="119" android:keyLabel="w" android:popupKeyboard="@xml/popupview"
     android:popupCharacters="2\@"/>

When the key is long-pressed, it shows the popup but it doesn't auto-close, i have to either select a character or press on a X (close) button. How can i make it auto-close and also be able to select a character by long pressing it and sliding to the desired character, like the AOSP keyboard in android?

Thanks.

Jay
  • 1,317
  • 4
  • 16
  • 40
pachuau
  • 81
  • 4

1 Answers1

0

You can use below code to hide soft keyboard

 getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
Android dev
  • 273
  • 2
  • 5
  • 23
  • Thanks for your reply. I am not trying to hide the soft keyboard. I want the popup characters (which appear when you long press a key), to close automatically if i lift the finger. – pachuau Apr 16 '14 at 12:49