dcorking / squeak-android-vm

Automatically exported from code.google.com/p/squeak-android-vm
0 stars 0 forks source link

figure out how we get the soft keyboard to work #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Andreas: I tried what I thought should work in the onTouchEvent handler but 
it doesn't do it for me. Having a way of programatically popping up the soft 
keyboard is definitely needed.

Micke: Perhaps InputMethodManager can be used to show the soft keyboard?
http://developer.android.com/reference/android/view/inputmethod/InputMethodMa
nager.html

Original issue reported on code.google.com by stefan.krecher on 2 Mar 2010 at 12:00

GoogleCodeExporter commented 9 years ago
Andreas: See the comment on line 62 of
http://code.google.com/p/squeak-android-
vm/source/browse/trunk/project/src/org/squeak/android/SqueakView.java

// XXXX: This *should* work but it doesn't. Why???
InputMethodManager imm = (InputMethodManager)
       getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
boolean result = imm.showSoftInput(this, 0);

Original comment by stefan.krecher on 2 Mar 2010 at 12:01

GoogleCodeExporter commented 9 years ago

Original comment by stefan.krecher on 2 Mar 2010 at 12:15

GoogleCodeExporter commented 9 years ago
At least in the Android Emulator sometimes the soft keyboard does appear: If I 
click
many times (about 40 times) randomly at the text area, the keyboard appears. And
after that, after every click it appears again.

Original comment by holzi...@gmail.com on 8 Apr 2010 at 4:37

GoogleCodeExporter commented 9 years ago
I'm not sure if this works on the emulator, but on my phone holding the menu 
key down for a few seconds will pop up the soft keyboard.

Original comment by incongru...@gmail.com on 5 Feb 2011 at 9:17

GoogleCodeExporter commented 9 years ago
I got it working to some degree (can handle alphanumerics, cannot handle 
backspace), in short view.setFocusableInTouchMode(true) has to be called after 
view.setFocusable. Looks like without that call the Squeak app view does not 
get keyboard focus even when touched.

In greater details, see 
http://forum.world.st/Got-soft-keyboard-working-to-some-degree-on-Android-td3323
893.html

Original comment by golubov...@gmail.com on 25 Feb 2011 at 2:28