FullScreen removed after soft keyboard use

edited March 2017 in Android Mode
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);

The fullscreen disappears and it's impossible to remove the task bar on the right of the screen.
Any idea?
Thanks in advance


  • 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.



  • edited March 2017

    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:


    I am thinking there is something else in your code causing the problem. Easy check is to run the ketai library (examples @ ketai.org).


  • edited March 2017

    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?


  • edited March 2017

    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 Screenshot_2017-03-03-07-18-57

    2>Open SoftKeyboard=>"Home" bar show up on the right Screenshot_2017-03-03-07-19-02

    3>Hide Keyboard=>The "Home" bar is still ON. How can I remove it to go back to full screen? Screenshot_2017-03-03-07-19-08

  • edited March 2017
    Android mode=3.02
    Processing=3.3 windows64
    Sketch is run on device in debug mode
  • That is very odd. No experience here with that one. Try this: https://developer.android.com/training/system-ui/navigation.html


  • edited March 2017


    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.

  • edited March 2017
    Thanks! Problem is solved, immersive mode has to be used!
    I add it in the MainActivity.java in eclipse.
Sign In or Register to comment.