1

I'm Trying to resize my screen on xamarin android when soft input appears. but my problem is i want to set padding for my view in resize mode. for example i want my view has 10 padding from top when soft input appears. but it fill my screen. I'm using this code after by loadApplication method

        Xamarin.Forms.Application.Current.On<Xamarin.Forms.PlatformConfiguration.Android>()
            .UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);
mohammad kamali
  • 409
  • 4
  • 12

1 Answers1

0

no event trigged while you have changed the softInputMethod. but there is a workaround like this to handle global layout changes

            FrameLayout content = (FrameLayout)activity.FindViewById(Android.Resource.Id.Content);
            mChildOfContent = content.GetChildAt(0);
            ViewTreeObserver vto = mChildOfContent.ViewTreeObserver;
            vto.GlobalLayout += (object sender, EventArgs e) => {
            //do whatever you want!
            //possiblyResizeChildOfContent();
            };
1SaeedSalehi
  • 364
  • 1
  • 8
  • 16