using Java.Util;
namespace first
{
public class StartActivityTimeTask : TimerTask
{
private Activity oldActivity;
public StartActivityTimeTask(Activity activity)
{
oldActivity = activity;
}
public override void Run()
{
Intent intent = new Intent(oldActivity, typeof(ActivityIntroduce));
oldActivity.StartActivity(intent);
}
}
}
namespace first
{
[Activity(Label = "ActivityWelcome",MainLauncher =true)]
public class ActivityWelcome : Activity
{
protected override void OnCreate(Bundle savedInstanceState)
{
this.RequestWindowFeature(WindowFeatures.NoTitle);
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.LayoutWelcome);
StartActivityTimeTask task = new StartActivityTimeTask(this);
Java.Util.Timer timer1 = new Java.Util.Timer();
timer1.Schedule(task, 5000);
}
}
}