Esempio n. 1
0
        internal static void LayoutRootPage(FormsAppCompatActivity activity, Page page, int width, int height)
        {
            int statusBarHeight = Forms.IsLollipopOrNewer ? activity.GetStatusBarHeight() : 0;

            statusBarHeight = activity.Window.Attributes.Flags.HasFlag(WindowManagerFlags.Fullscreen) || Forms.TitleBarVisibility == AndroidTitleBarVisibility.Never ? 0 : statusBarHeight;

            if (page is MasterDetailPage)
            {
                page.Layout(new Rectangle(0, 0, activity.FromPixels(width), activity.FromPixels(height)));
            }
            else
            {
                page.Layout(new Rectangle(0, activity.FromPixels(statusBarHeight), activity.FromPixels(width), activity.FromPixels(height - statusBarHeight)));
            }
        }
Esempio n. 2
0
 internal static void LayoutRootPage(FormsAppCompatActivity activity, Page page, int width, int height)
 {
     page.Layout(new Rectangle(0, 0, activity.FromPixels(width), activity.FromPixels(height)));
 }