I have a Xamarin application using HybridWebView. Inside of it I have an input at the end of the screen and when I click on it the device's keyboard is above the input, so I cannot see what I am typing. I figured out how to add height on the screen when the input is clicked, but I believe this is not the most appropriate way to do it.
There is a better way to do it? Thanks
Try thats, I do not remember exactly. If I understand the problem rightly, someone will work for them. Please try and write results.
android:windowSoftInputMode="adjustPan"
or
android:windowSoftInputMode="adjustNothing"
I found a solution, just put this in the App.cs constructor:
Xamarin.Forms.PlatformConfiguration.AndroidSpecific.Application.SetWindowSoftInputModeAdjust(this, Xamarin.Forms.PlatformConfiguration.AndroidSpecific.WindowSoftInputModeAdjust.Resize);
Reference: https://bugzilla.xamarin.com/show_bug.cgi?id=50792
Try to use, in your MainActivity's Activity attributes:
WindowSoftInputMode = SoftInput.AdjustResize
or
WindowSoftInputMode = SoftInput.AdjustPan
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.