0

Who can faced or tell me which way to look, the lower menu appears by pressing a button, the height equal to the height traveled keyboard.

As seen here: https://i.stack.imgur.com/ZAtQh.jpg or https://i.stack.imgur.com/6gFdN.jpg

ledex
  • 97
  • 1
  • 1
  • 7
Serega
  • 1
  • 2

1 Answers1

0

So you want to make the View the same height as the keyboard. Getting the keyboard height is not trivial, see this question. It will only work after the keyboard was opened at least once, otherwise the app cannot know it's height. You will notice that the apps you used as examples also show the menus in a different height (some default) if you never opened the keyboard in them.

Nohus
  • 739
  • 8
  • 16
  • Yes, the height of the keyboard can get at the time of its discovery, this only works when android: windowSoftInputMode = "adjustResize", and if the first to open the bottom menu for the first time about the height of the show like? and then adjust? Then another question, if windowSoftInputMode = "adjustResize" the keyboard appears at the bottom show the menu and click on edittext and shifts and edittext and all the bottom menu up, do not tell me how to avoid this? – Serega Sep 13 '16 at 20:59
  • Open the `View` with a default height if you don't know the keyboard height. Then adjust after you get to know the keyboard height. If you don't want your bottom menu to show when they keyboard is open, then hide it when the keyboard opens. You can detect the keyboard opening the same way you detect it's size. In the `onGlobalLayoutListener()`. – Nohus Sep 13 '16 at 21:04