Use the Activity’s isFinishing() method.
@Override
protected void onDestroy() {
super.onDestroy();
if (isFinishing()) {
// do stuff
} else {
//It's an orientation change.
}
}
Use the Activity’s isFinishing() method.
@Override
protected void onDestroy() {
super.onDestroy();
if (isFinishing()) {
// do stuff
} else {
//It's an orientation change.
}
}