0

I'm learning Xamarin and focusing on a Xamarin Android App. The first screenshot is when keyboard is close and the second screenshot is when keyboard is open, I'm trying to make the page automatically move up when the keyboard is prompt.

the below is the constructor of my App class where I tried using

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

public App()
{
    InitializeComponent();            
    AndroidSpecific.Application.SetWindowSoftInputModeAdjust(this, 
    AndroidSpecific.WindowSoftInputModeAdjust.Resize);
    MainPage = new NavigationPage(new MainPage());
}

but it is still not working. How to solve it?

before keyboard is open after keyboard is open

Jeremy Parker
  • 348
  • 1
  • 3
  • 15
  • This is the default configuration that the keyboard won't overlap your current input control. You could hide the keyboard through tapping the finished button(blue right arrow). Why do you want to move the whole page up? This may push the input outside the top layer. – Anonymous May 14 '19 at 09:37
  • @LandLu-MSFT Because the keyboard hides anything below the input box, for example the button and forgot password link. That is why I would like to move it up. – Jeremy Parker May 14 '19 at 13:53

1 Answers1

0

You need to have a ScrollerView in the page in the proper position to achieve that effect.

Ivan Ičin
  • 7,975
  • 5
  • 32
  • 49