protected override void OnCreate(Bundle bundle) { base.OnCreate (bundle); SetContentView (Resource.Layout.BKE_Layout); // Create your application here screen_size = Util.DetectScreenSize (); if (bundle == null) { Start (); } }
public static CustomSize DetectScreenSize() { if (cs == null) { DisplayMetrics metrics = displayMetrics; int width = ConvertPixelsToDp(metrics.WidthPixels); int height = ConvertPixelsToDp(metrics.HeightPixels); cs = new CustomSize(720,1280); //cs = new CustomSize(width,height); } return cs; //return new int[] { width, height }; }