protected override void OnCreate(Bundle bundle) { base.OnCreate (bundle); _view = new ClockView (this); SetContentView (_view); var timer = new Timer (1); timer.Elapsed += delegate { RunOnUiThread (delegate { _view.Invalidate (); }); }; timer.Start (); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); _view = new ClockView(this); SetContentView(_view); var timer = new Timer(1); timer.Elapsed += delegate { RunOnUiThread(delegate { _view.Invalidate(); }); }; timer.Start(); }
protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); System.Diagnostics.Debug.WriteLine("Density: " + Resources.DisplayMetrics.Density + ", DensityDpi: " + Resources.DisplayMetrics.DensityDpi + ", HeightPixels: " + Resources.DisplayMetrics.HeightPixels + ", ScaledDensity: " + Resources.DisplayMetrics.ScaledDensity + ", WidthPixels: " + Resources.DisplayMetrics.WidthPixels + ", Xdpi: " + Resources.DisplayMetrics.Xdpi + ", Ydpi: " + Resources.DisplayMetrics.Ydpi); _view = new ClockView(this, 2.5f); SetContentView(_view); var timer = new Timer(1); timer.Elapsed += delegate { RunOnUiThread(delegate { _view.Invalidate(); }); }; timer.Start(); }