简体   繁体   中英

How to make the View Snap to Keyboard

My MasterDetail app won't The keyboard won't snap to the bottom of the view, it overlaps it. Main View is a contentpage Wrapped In (MasterDetail Page).

I've placed some elements at the bottom of my main Contentpage via VerticalOptions="end" and they are at the bottom of the page when I scroll(scrollview with button inside grid (with highest z-index)), but they are covered when the keyboard is opened(from editor sibling to button inside grid). I've tried setting this code:

<Activity Android: 
windowSoftInputMode="adjustResize">
</activity>

in AndroiManifest.xml but it doesn't work.

default page view, not my app but same structure

Expected behavior

Actual behavior

If you are talking about keyboard covering your controls,

For android:

Add in this your MainActivity after LoadApplication(new App());

        App.Current.On<Xamarin.Forms.PlatformConfiguration.Android>().
        UseWindowSoftInputModeAdjust(WindowSoftInputModeAdjust.Resize);

For ios refer this link

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM