using Android.App; using Android.Content.PM; using Android.Views; using Android.Widget; using Android.OS; using Urho.Droid; namespace $safeprojectname$ { [Activity(Label = "$safeprojectname$", MainLauncher = true, Icon = "@drawable/icon", Theme = "@android:style/Theme.NoTitleBar.Fullscreen", ConfigurationChanges = ConfigChanges.KeyboardHidden | ConfigChanges.Orientation, ScreenOrientation = ScreenOrientation.Landscape)] public class MainActivity : Activity { protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); var layout = new AbsoluteLayout(this); var surface = UrhoSurface.CreateSurface(this); layout.AddView(surface); SetContentView(layout); } protected override void OnResume() { UrhoSurface.OnResume(); base.OnResume(); } protected override void OnPause() { UrhoSurface.OnPause(); base.OnPause(); } public override void OnLowMemory() { UrhoSurface.OnLowMemory(); base.OnLowMemory(); } protected override void OnDestroy() { UrhoSurface.OnDestroy(); base.OnDestroy(); } public override bool DispatchKeyEvent(KeyEvent e) { if (!UrhoSurface.DispatchKeyEvent(e)) return false; return base.DispatchKeyEvent(e); } public override void OnWindowFocusChanged(bool hasFocus) { UrhoSurface.OnWindowFocusChanged(hasFocus); base.OnWindowFocusChanged(hasFocus); } } }