I would like dismiss a DialogFragment on orientation change.
The problem is that the OnConfigurationChanged() is never called.
And call :
this.dismiss();
from the OnDetach() method, returns a null pointer exception. What could I do?
I would like dismiss a DialogFragment on orientation change.
The problem is that the OnConfigurationChanged() is never called.
And call :
this.dismiss();
from the OnDetach() method, returns a null pointer exception. What could I do?
Overriding :
public void onPause() {
super.onPause();
this.dismiss();
}
instead of OnConfigurationChanged(), did the trick.
onConfigurationChanged not getting called
Add this to your manifest
android:configChanges="orientation|screenSize"