0

I'm creating android app, in that there is bottom navigation bar like youtube and other social media. And there is one textbox in my application, so when i type on textbox keyboard is open and bottom navigation bar is reside over my keyboard. So how can i hide bottom navigation bar when i start typing.

Parent layout of app is Linearlayout.

And adjustPan will not work.

  • Hi, welcome to stack overflow. You need to provide all the details and mention the issue clearly what exactly you want. Please refer the [ask] link for more detail and update your question accordingly. – Jeroen Heier Oct 05 '18 at 03:51
  • https://stackoverflow.com/questions/35267425/hide-part-of-activity-main-xml-if-keyboard-is-open-android/35267926#35267926 – ॐ Rakesh Kumar Oct 05 '18 at 04:34

1 Answers1

-1

You can do like this

View decorView = getWindow().getDecorView();
// Hide both the navigation bar and the status bar.
// SYSTEM_UI_FLAG_FULLSCREEN is only available on Android 4.1 and higher, but as
// a general rule, you should design your app to hide the status bar whenever you
// hide the navigation bar.
int uiOptions = View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
              | View.SYSTEM_UI_FLAG_FULLSCREEN;
decorView.setSystemUiVisibility(uiOptions);

Ref: https://developer.android.com/training/system-ui/navigation

Tung Duong
  • 1,156
  • 7
  • 19