I analyzed crashes of type 3 and noticed that some classes derived from BaseFragment(eg. AboutFragment)
have code:
public void onDestroy() {
super.onDestroy();
scope.main().getActionBar().setDisplayHomeAsUpEnabled(true);
scope.main().getActionBar().setHomeButtonEnabled(true);
}
and some have code:
public void onStop() {
{
super.onStop();
scope.main().getActionBar().setDisplayHomeAsUpEnabled(true);
scope.main().getActionBar().setHomeButtonEnabled(true);
}
Crashes sometimes happen in the classes with onDestroy() method( null pointer exception).
I have a question: When a class must have code in the method onDestroy() and when in the method onStop()?
I analyzed crashes of type 3 and noticed that some classes derived from BaseFragment(eg. AboutFragment) onDestroy( ); main(). getActionBar( ).setDisplayHom eAsUpEnabled( true); main(). getActionBar( ).setHomeButton Enabled( true); main(). getActionBar( ).setDisplayHom eAsUpEnabled( true); main(). getActionBar( ).setHomeButton Enabled( true);
have code:
public void onDestroy() {
super.
scope.
scope.
}
and some have code:
public void onStop() {
{
super.onStop();
scope.
scope.
}
Crashes sometimes happen in the classes with onDestroy() method( null pointer exception).
I have a question: When a class must have code in the method onDestroy() and when in the method onStop()?