Answer the question
In order to leave comments, you need to log in
Why is OnBackPressed not working correctly?
In MainActivity.cs :
intent = new Intent(this, typeof(LevelActivity));
StartActivity(intent);
public void OnClick(View v)
{
switch (v.Id)
{
case Resource.Id.backButtonLevels:
this.OnBackPressed();
break;
}
}
Answer the question
In order to leave comments, you need to log in
SO, the thing is, when you return to the page like this, the OnStart() function is called, and my OnStart() was like this:
protected override void OnStart()
{
base.OnStart();
startButton.Click += StartButton_Click;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question