Exemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            this.RequestedOrientation = ScreenOrientation.Landscape;
            this.Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);

            global::Xamarin.Forms.Forms.Init(this, bundle);

            SaveAndLoad_Android.GetGASInstance().Initialize_NativeGAS(this);

            int dim1 = (int)(Resources.DisplayMetrics.WidthPixels);
            int dim2 = (int)(Resources.DisplayMetrics.HeightPixels);

            if (dim1 >= dim2)
            {
                App.ScreenWidth  = dim1;
                App.ScreenHeight = dim2;
            }
            else
            {
                App.ScreenWidth  = dim2;
                App.ScreenHeight = dim1;
            }

            LoadApplication(new App());
        }
Exemplo n.º 2
0
 public static SaveAndLoad_Android GetGASInstance()
 {
     if (thisRef == null)
     {
         // it's ok, we can call this constructor
         thisRef = new SaveAndLoad_Android();
     }
     return(thisRef);
 }