Return super.onBackPressed() in onBackPressed() method in MainPage.