Closed Cornholio2108 closed 4 years ago
Modify MainActivity:
@Override
public void onBackPressed() {
...
if(fragment instanceof FragAlarms)
{
//finish();
//replace with:
MainActivity.this.moveTaskToBack(true);
}
...
}
Fixed with FragmentTransaction.commitAllowingStateLoss();
instead of .commit()
Pressing the back button on the main screen (alarm list) will cause the app to crash.