-3

enter image description here

when an android soft keyboard is enabled via the interaction with an input field, the navigation bar is also enabled along with the keyboard. Is there any way to disable/hide the navigation bar in this case?

This is implemented in Unity#d, but if a solution is available in android, it can be added as plug-in to unity as well. Any direction or solution is helpful, thanks.

app supported API version is from 22 to 32.

djkpA
  • 1,224
  • 2
  • 27
  • 57

1 Answers1

0

If you want a easier option You could just set the Fullscreen mode to Fullscreen WindowFullscreen Window

Android Player settings -> Resolution and Presentation

As the Documentation reads

In this mode the navigation bar is always hidden. This replaces the Start in fullscreen mode option.

still I'd suggest having a look at Unity tidbits

When implementing it in your Unity project, you can hide or show the Navigation Bar or Status Bar via code. so you could just check OnPointerClick and when it happens set

ImmersiveAndroid.navigationBarState = ImmersiveAndroid.States.Hidden;
Pixel Paras
  • 169
  • 5
  • The full-screen window is already enabled, I tried Unity tidbits, it didn't work. Have you tried and it is working for you? – djkpA Jan 18 '22 at 12:51
  • yes it did work in my project. The navigation bar hide works on android 4.4 (Kitkat ) and above only. If its below android 4.4, it works but just without hiding navigation bar.(Since this feature is given by android only after Kitkat - 4.4) are you sure you meet the requirments? – Pixel Paras Jan 18 '22 at 12:57
  • Also the Navigation bar coming up whilst keyboard is present is a android feature and that doesn't stop during ImmersiveMode so I'd say your best bet would be to edit the ``AndroidManifest.xml`` and just add ``activity android:windowSoftInputMode="adjustPan"/>`` but adjustPan is generally not the right solution if you are using ``ScollViews`` or ``action bars``. – Pixel Paras Jan 18 '22 at 13:12
  • I tried the adjustPan as well. It didn't work. Navigation bar is enabled along with keyboard. Can you provide me the example project that you test on. I can check it for the any missing changes. – djkpA Jan 18 '22 at 16:47
  • Setting Fullscreen window and also setting Render outside safe area doesnt works – supernatural May 07 '22 at 13:31