Skip to content
Permalink
Fetching contributors…
Cannot retrieve contributors at this time
44 lines (36 sloc) 1.62 KB
using System;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using SampleApp.Config;
using CauserException.Config;
namespace CauserException.Droid
{
[Activity(Icon = "@mipmap/ic_launcher", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle savedInstanceState)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(savedInstanceState);
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
LoadApplication(new App());
InitPreloadDependencies();
}
private void InitPreloadDependencies()
{
var configFile = Constants.CurrentEnvironment == AppEnvironment.Unspecified ? Constants.DefaultConfigPath : $"appsettings.{Constants.CurrentEnvironment}.json";
ConfigurationManagerDroid.Init(this, configFile);
}
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
}
}
You can’t perform that action at this time.