public void SetActiveTask( Tasks.Task newTask ) { // first, are we active? If we aren't, there's no way // we ever activated a task, so there's no need to deactivate anything. if ( IsFragmentActive == true ) { // we are active, so if we have a current task, deactivate it. if ( ActiveTask != null ) { ActiveTask.Deactivate( false ); } // activate the new task newTask.Activate( false ); // force the springboard to close if ( MainActivity.IsLandscapeWide( ) == false ) { RevealSpringboard( false ); } } else { // activate the new task newTask.Activate( false ); } // take our active task. If we didn't activate it because we aren't // ready, we'll do it as soon as OnResume is called. ActiveTask = newTask; }