While practicing splash screen I added Xamarin.Support.v4 package and Xamarin.Android.v7.appcompat; everything is fine, I am just getting this warning:
1>JAVAC : warning : unknown enum constant Scope.LIBRARY_GROUP
and my code is working well. my code of splash activity is:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.Support.V7.App;
using System.Threading.Tasks;
using Android.Util;
namespace againCardview
{
[Activity(Label = "SplashActivity",MainLauncher =true,NoHistory =true,Theme = "@style/MyTheme.Splash")]
public class SplashActivity :AppCompatActivity
{
string tag = "TAg" + typeof(SplashActivity).Name;
public override void OnCreate(Bundle savedInstanceState,PersistableBundle persist)
{
base.OnCreate(savedInstanceState,persist);
Log.Debug(tag, "this is Oncreate method of splashActivity");
}
protected override void OnResume()
{
base.OnResume();
var setartActivity = new Task(()=> {
Log.Debug(tag, "Now App is starting");
Task.Delay(50000);
Log.Debug(tag, "now performing importing work");
});
setartActivity.ContinueWith(p => {
Log.Debug(tag, "Starting App");
StartActivity(new Intent(Application.Context, typeof(MainActivity)));
},TaskScheduler.FromCurrentSynchronizationContext());
}
}
}