You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
861 B
30 lines
861 B
using Android.App;
|
|
using Android.Content;
|
|
using Android.OS;
|
|
using Android.Support.V7.App;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Demo.Droid
|
|
{
|
|
[Activity(Theme = "@style/MyTheme.Splash", MainLauncher = true, NoHistory = true)]
|
|
public class SplashActivity : AppCompatActivity
|
|
{
|
|
public override void OnCreate(Bundle savedInstanceState, PersistableBundle persistentState)
|
|
{
|
|
base.OnCreate(savedInstanceState, persistentState);
|
|
}
|
|
|
|
protected override void OnResume()
|
|
{
|
|
base.OnResume();
|
|
Task startupWork = new Task(() => { SimulateStartup(); });
|
|
startupWork.Start();
|
|
}
|
|
|
|
private async void SimulateStartup()
|
|
{
|
|
await Task.Delay(1);
|
|
StartActivity(new Intent(Application.Context, typeof(MainActivity)));
|
|
}
|
|
}
|
|
} |