xamarin forms 输入法弹框遮挡住输入框或部分UI,不能滑动

先解决Android上的:
在登录注册页面,往往有多个输入框和提交Button,当点击某些输入框时,输入法弹框弹出,
但页面不能滑动,造成下面输入框或button或其它view不能显示,仅管使用了ScrollView。
针对于Android 平台上,添加下面代码:
Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(Xamarin.Forms.PlatformConfiguration.AndroidSpecific.WindowSoftInputModeAdjust.Resize);

public partial class App : Xamarin.Forms.Application
    {
        public App()
        {
           // NativeAPIUtil.Instance.SetFullScreen();
            NativeAPIUtil.Instance.SetOritation(1);
            InitializeComponent();
            Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>().UseWindowSoftInputModeAdjust(Xamarin.Forms.PlatformConfiguration.AndroidSpecific.WindowSoftInputModeAdjust.Resize);
            switch (Device.RuntimePlatform)
            {
                case Device.Android:

                    MainPage = new LoginPage();
                    break;
                case Device.iOS:
                case Device.UWP:
                case Device.macOS:
                default:   
                    MainPage = new SplashPage(); // new NavigationPage(new SplashPage());SplashPage
                    break;
            } 

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容