using Android.App; using Android.Content.PM; using Android.OS; using AndroidX.AppCompat.App; namespace Borepin.Droid { [Activity(Theme = "@style/MainTheme", ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)] public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity { protected override void OnCreate(Bundle savedInstanceState) { AppCompatDelegate.DefaultNightMode = AppCompatDelegate.ModeNightNo; TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); ZXing.Net.Mobile.Forms.Android.Platform.Init(); Xamarin.Essentials.Platform.Init(this, savedInstanceState); Xamarin.Forms.Forms.Init(this, savedInstanceState); LoadApplication(new App(new PlatformInitializer())); } public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults) { Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults); base.OnRequestPermissionsResult(requestCode, permissions, grantResults); } } }