1

I have an activity with BottomNavigation. If the user needs to click on the submit button soft keyboard hides it. Then he again needs to press the back button to see the submit button. In this case, I used windowSoftInputMode='adjustResize' so that the screen gets resized automatically and the user can scroll up and click on the submit button.

But, I have BottomNavigation too, windowSoftInputMode='adjustResize' makes BottomNavigation float above the soft keyboard. Can anyone suggest a better solution? Any help will be appreciated. Thanks

Arsee
  • 283
  • 5
  • 20

1 Answers1

0

Thats tricky issue... You have two options in here:

  1. Keep 'adjustResize' and hide BottomNavigation view when keyboard pops up (e.g. simply setVisiblity?)
  2. Change to e.g. 'adjustPan' (or any other) preventing keyboard resizing app and add bottom padding with height of keyboard for whole content container. BottomNavigation will stay hidden under keyboard, but padding will allow scrolling to Submit button

In both cases you need to detect open/close keyboard, in second case you will also need keyboard height measuring. IN HERE and HERE you have big SO topics about this case, check out answers and comments, and pick proper resolution for your purposes

snachmsm
  • 17,866
  • 3
  • 32
  • 74