capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

feat: Keyboard.setResizeMode none for android

Open piotrblasiak opened this issue 5 years ago • 8 comments

Feature Request

Describe the Feature Request

Is this supposed to work/be implemented or just not possible in android? Or is there a workaround? I need the keyboard to cover the webview like it does in iOS.

Platform Support Requested

  • [x] Android
  • [ ] iOS
  • [ ] Electron
  • [ ] Web

piotrblasiak avatar Jan 22 '20 09:01 piotrblasiak

At the moment, if you don't want to resize the webview, you can add android:windowSoftInputMode="adjustPan" to your activity in the AndroidManifest.xml

I've been looking into it and seems possible from code to, so should be implemented

jcesarmobile avatar Jan 23 '20 12:01 jcesarmobile

At the moment, if you don't want to resize the webview, you can add android:windowSoftInputMode="adjustPan" to your activity in the AndroidManifest.xml

I've been looking into it and seems possible from code to, so should be implemented

Is this confirmed? I tried it and it does not seem to make any difference - the webview is still resized.

piotrblasiak avatar Jan 27 '20 04:01 piotrblasiak

I tested with this code Capacitor.Plugins.Keyboard.addListener("keyboardDidShow", () => console.log('keyboardDidShow', window.innerWidth, window.innerHeight)); and the height didn't change after adding that line, so I think it works, but you can share your testing too

jcesarmobile avatar Jan 27 '20 10:01 jcesarmobile

Ok, the fault was that I put it on <application> instead of <activity>. Sorry for the late reply and thanks!

piotrblasiak avatar Mar 08 '20 15:03 piotrblasiak

Reopening as seem possible with code too, so should be implemented

jcesarmobile avatar Mar 08 '20 21:03 jcesarmobile

Is there a solution for this yet? I can do android:windowSoftInputMode="adjustPan" but then I am not able to scroll on the page which is a functionality I need

shayanaijaz avatar Aug 14 '20 01:08 shayanaijaz

Is there a solution for this yet? I can do android:windowSoftInputMode="adjustPan" but then I am not able to scroll on the page which is a functionality I need

+1

MarcosBeGo avatar Sep 01 '20 17:09 MarcosBeGo

Hi

According this (https://stackoverflow.com/questions/46751925/how-to-set-windowsoftinputmode-programmatically-from-fragments), it is indeed possible to change it programmatically.

However, to be fully useful, it would be great if the webview could be moved on top on the keyboard -so the upper part is outside the top border of the viewport- and we could scroll the whole webview, not only the ion-content part.

roxteddy avatar Feb 09 '21 15:02 roxteddy