I am having below code in my Main Launcher activity. My problem is at first time while launching the app, MainActivity was created, but if am going to android home screen or starting some other app, and if i came back & touches the app icon means again it creating the activity instead of restarting it. I want it to retain the previous state and restart the activity, once if the Activity is being created.
[Activity (Label="Notes", MainLauncher=true, AlwaysRetainTaskState = true, LaunchMode = Android.Content.PM.LaunchMode.SingleInstance, Theme = "@style/Theme.AppCompat")]
[MetaData("android.support.UI_OPTIONS", Value = "splitActionBarWhenNarrow")]
public class NotesList : ActionBarActivity
{
}
I added AlwaysRetainTaskState = true, LaunchMode = Android.Content.PM.LaunchMode.SingleInstance
these attributes for retaining the previous state, but no response.