Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

iOS Scaling and the well known keyboard problem.

$
0
0

Developers!

I was wondering, why do I get those black bars when using a 4 inch retina IphoneSimulator.

And how does Xamarin.Forms handle the "Keyboard overlaps textfield" problem in iOS. Do I still have to handle this myself?

The Code I use:

`public class FirstPage : ContentPage
{
StackLayout stackLayout;
AbsoluteLayout absoluteLayout;
public FirstPage()
{
absoluteLayout = new AbsoluteLayout()
{
HorizontalOptions = LayoutOptions.FillAndExpand,
VerticalOptions = LayoutOptions.FillAndExpand
};

        // Put everything in a StackLayout.
        stackLayout = new StackLayout
        {
            Children = 
            {
                new Label
                {
                    Text = "Hello, Forms !",
                    VerticalOptions = LayoutOptions.CenterAndExpand,
                    HorizontalOptions = LayoutOptions.CenterAndExpand,
                },
                absoluteLayout
            },
        };

        this.Padding = new Thickness(0, Device.OnPlatform(20, 0, 0), 0, 0);
        this.Content = stackLayout;
    }
}`

Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>