processing-android icon indicating copy to clipboard operation
processing-android copied to clipboard

closeKeyoard() ... Navigation bar doesn't always disappear

Open hudsonm4000 opened this issue 4 years ago • 1 comments

Hi

I raised this on the Processing forum a while back but didn't get any replies. I've done a lot of reading etc and this may not have a solution from what I have found out ... but hopefully an Android expert here might know something

The issue ... if I open the soft keyboard everything works fine until I have used the Navigation Bar HIDE arrow. The keyboard gets hidden as expected, but the bottom Navigation Bar stays visible ... I can get the keyboard back by recalling openKeyboard(), and using the RETURN key does close everything including the Nav Bar, but why doesn't it disappear when just hiding the keyboard?

Looking at the closeKeyboard() code, I am guessing my tapping on the HIDE button sets keyBoardIsOpen to false, so that the closeKeyboard() function can never execute, or that the parentLayout test isn't being net to setFullScreen again?

  public void closeKeyboard() {
    if (this.keyboardIsOpen) {
      Context context = this.surface.getContext();
      InputMethodManager imm = (InputMethodManager)context.getSystemService("input_method");
      imm.toggleSoftInput(1, 0);
      this.keyboardIsOpen = false;
      if (this.parentLayout == -1) {
        this.setFullScreenVisibility();
      }
    }
  }

This is on an oldish phone running Marshmallow. May not be an issue on a more modern device. I don't know!

Any thoughts, anyone?

Thanks Mark

hudsonm4000 avatar May 11 '21 07:05 hudsonm4000

I'd need to look into it more closely to see what's the problem or if it's still present in newer versions of Android. Tagging for the next bugfix release. Thank you!

codeanticode avatar Jun 01 '21 02:06 codeanticode