App Scroll up when keyboard is visible

Hello everyone.

I have a web view on my app that requires an user input. But when the android’s virtual keyboard comes up, it hides the input label on the webview. Is there any suggestions to how focus on this label specific?

I tried use android:windowSoftInputMode=“adjustPan”, but it didn’t make any difference.

Hi @Randomzord,

Editbox has events like editing-did-began , editing-did-ended , editing-return

You can attach a function and scroll page when editing began and restore previous scroll position when editing ended. I used this method in on of may games but couldn’t find to get exact height of virtual keyboard.

Hope this helps :wink:

1 Like

Hello, I think that I was not clear enought, sorry.

I’m not setting a label inside Cocos Creator, I have a WebView (with a support page), and in this web view the user can focus on a label on a third-party website.

I gave up anyway, I’m sending to the support page via browser

You may register focus event in the label and call some functions to let your app when to scroll the page but it get too complicated imo also :slight_smile: