Device keyboard is over Input

Asked

Viewed 277 times

2

I have an application in Xamarin using Hybriwebview (HTML screens). Inside it I have a text input at the bottom of the screen and when I click on the input the keyboard of the phone is over my input, so I can’t see what I’m typing. I found how solutions on the internet add Height to the screen when the input is clicked, but I believe there is a more correct way to do this.

Does anyone have any idea?

  • Adding height to the screen is the most correct solution

1 answer

1

The most correct solution is not to add height as mentioned above.

In the desired Activity.Cs add the following attribute:

WindowSoftInputMode = SoftInput.AdjustPan

Example:

inserir a descrição da imagem aqui

Answer was taken from Stackoverflow.com: Source

  • It would work if my screens were in C#, but they are in HTML, so this command does not work. :/

  • I found something about this here: https://forums.xamarin.com/discussion/63463/listen-to-virtual-keyboard-keypress-inside-webview. But it’s much more complicated than just using 'height'. I think you should keep using the "gambiarra" anyway.

  • didn’t work here either.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.