protected override async void OnCreate(Bundle bundle) { base.OnCreate(bundle); var mLayout = new AbsoluteLayout(this); surface = UrhoSurface.CreateSurface(this); // (this, , true); mLayout.AddView(surface); SetContentView(mLayout); app = await surface.Show(Type.GetType(Intent.GetStringExtra("Type")), new ApplicationOptions("Data")); }
async void OnRestart(object sender, EventArgs e) { if (surface != null) { await surface.Stop(); await Task.Yield(); var viewGroup = surface.Parent as ViewGroup; viewGroup?.RemoveView(surface); } surface = UrhoSurface.CreateSurface(this); placeholder.AddView(surface); game = await surface.Show <Game>(new Urho.ApplicationOptions()); }