locked
WebView doesn't get resized or panned when soft keyboard is overlayed RRS feed

  • Question

  • User273939 posted

    I'm using Xamarin Forms 2.3.3.175, the latest version, and testing on Lollipop emulator.

    When the input field in a WebView get focused, the software keyboard is scrolling up and the input field is overlayed. The keyboard hides the focused input field as shown in the screenshots.

    If I create and click a Entry rather than the WebView, it resizes the content page as expected. I've searched a lot with this issue but none of them works with WebView case.(including setting WindowSoftInputMode = SoftInput.AdjustResize on Activity)

    I can say this behavior in Xamarin.Forms is buggy because If I create a WebView in Android with Activity rather than FormsAppCompatActivity, the WebView is scrolled up OK.

    My test codes are just a simple WebView in a ScrollView

    Wednesday, December 21, 2016 3:02 PM

All replies

  • User273939 posted

    I've reported this as a bug

    adrianknight89 gave me a workaround, but applying it caused System.TypeLoadException in my test codes.

    Tuesday, December 27, 2016 7:36 AM
  • User273939 posted

    related issue

    Tuesday, December 27, 2016 9:02 AM
  • User295378 posted

    I'm facing the same issue. Is there a way to solve it

    Thursday, September 21, 2017 6:41 AM
  • User881 posted

    Reference https://bugzilla.xamarin.com/show_bug.cgi?id=50792

    The suggested work around resolved this issue for me. In the constructor in Ap.Xaml.cs:

    using AndroidSpecific = Xamarin.Forms.PlatformConfiguration.AndroidSpecific;

    AndroidSpecific.Application.SetWindowSoftInputModeAdjust(this, AndroidSpecific.WindowSoftInputModeAdjust.Resize);

    Monday, November 20, 2017 8:42 PM
  • User261729 posted

    @DavidClarke said: Reference https://bugzilla.xamarin.com/show_bug.cgi?id=50792

    The suggested work around resolved this issue for me. In the constructor in Ap.Xaml.cs:

    using AndroidSpecific = Xamarin.Forms.PlatformConfiguration.AndroidSpecific;

    AndroidSpecific.Application.SetWindowSoftInputModeAdjust(this, AndroidSpecific.WindowSoftInputModeAdjust.Resize);

    Thank you @DavidClarke ,

    This code worked for me.

    Thursday, March 1, 2018 8:26 AM
  • User381770 posted

    @ManojkumarMali hi if you have any idea for IOS please post it here

    Friday, January 17, 2020 10:11 AM
  • User381770 posted

    @DavidClarke hi any idea for IOS?please post it here

    Friday, January 17, 2020 10:12 AM