We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello, my sketch runs in fullscreen (and orientation(landscape))and it's OK. But when I open a soft keyboard with:
void showSoftKeyboard() {
android.view.inputmethod.InputMethodManager imm = (android.view.inputmethod.InputMethodManager) getActivity().getSystemService(android.content.Context.INPUT_METHOD_SERVICE);
imm.showSoftInput(getActivity().getCurrentFocus(), 0);
}
void hideSoftKeyboard() {
android.view.inputmethod.InputMethodManager imm = (android.view.inputmethod.InputMethodManager) getActivity().getSystemService(android.content.Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(getActivity().getCurrentFocus().getWindowToken(), 0);
deci=0;
}
The fullscreen disappears and it's impossible to remove the task bar on the right of the screen.
Any idea?
Thanks in advance
Answers
Please edit your post and format your code. Select your code and press ctrl+o and leave an empty line above and below your code.
https://forum.processing.org/two/search?Search=InputMethodManager
Kf
Thanks for the tip regarding the shape of the post. I had a look to your link but don't find any solution. Thanks for your help. Pascal
Your code seems to be similar to the ketai ui keyboard:
https://github.com/ketai/ketai/blob/master/src/ketai/ui/KetaiKeyboard.java
I am thinking there is something else in your code causing the problem. Easy check is to run the ketai library (examples @ ketai.org).
Kf
Thanks for the link! I tried the example from the ketai web site :http://ketai.org/examples/ui/ and it behave the same as what I have. As soon as I open the keyboard the bar on the righ show up. How can I remove it? Thanks again for your help.
Not sure what you mean. Could you provide a screenshot? Also, could you provide OS, phone, Android mode vers, P5 vers, target API?
Kf
OK, I'm going to add pictures.
Phone= HTC DESIRE 510, OS=ANDROID 4.4.3 API19, Target API=19, Default Manifest + fullscreen
Run Ketai example. 1>Sketch in fullscreen
2>Open SoftKeyboard=>"Home" bar show up on the right
3>Hide Keyboard=>The "Home" bar is still ON. How can I remove it to go back to full screen?
That is very odd. No experience here with that one. Try this: https://developer.android.com/training/system-ui/navigation.html
Kf
@paco06===
running the ketai example ui (the same as you do i think, but it could be better to put the complete code you are using) with fullscreen() i never got your result. What i dont understand is why you are adding hide && show methods as they are already wrapped by ketai && toggle line 48....Other strange thing is that your task bar appears on the right (you are in landscape mode and if it appears it must appears top or bottom); anyway you can also create a method forcing the full screen with getWindow(). And finally: are you sure to use the last version from Ketai?
Akenaton, thanks for your feedback. I tried on Samsung Grand Prime Android 5.1.1 (API22) and it doesn't show the issue.
I had a similar issue that was fixed by upgrading to the RC4 of Android Mode. Whenever those buttons appear you just wait a few seconds or tap in the screen somewhere and the fade away.