Fixed another crash occuring when changing the screen orientation when a dialog is opened.
This commit is contained in:
parent
ee3784ca39
commit
74f4bf1c0d
2 changed files with 4 additions and 6 deletions
|
@ -240,8 +240,8 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
|
|||
|
||||
switch(id) {
|
||||
case R.id.menu_reset:
|
||||
ResetConfirmationDialog hintDialog = new ResetConfirmationDialog();
|
||||
hintDialog.show(getFragmentManager(), "ResetDialogFragment");
|
||||
ResetConfirmationDialog resetDialog = new ResetConfirmationDialog();
|
||||
resetDialog.show(getFragmentManager(), "ResetDialogFragment");
|
||||
break;
|
||||
|
||||
case R.id.nav_newgame:
|
||||
|
@ -391,7 +391,7 @@ public class GameActivity extends AppCompatActivity implements NavigationView.On
|
|||
public void onAttach(Activity activity) {
|
||||
super.onAttach(activity);
|
||||
// Verify that the host activity implements the callback interface
|
||||
if(activity instanceof IHintDialogFragmentListener) {
|
||||
if(activity instanceof IResetDialogFragmentListener) {
|
||||
listeners.add((IResetDialogFragmentListener) activity);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.secuso.privacyfriendlysudoku.ui.view;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
|
@ -180,8 +179,7 @@ public class SudokuSpecialButtonLayout extends LinearLayout implements IHighligh
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressLint("ValidFragment")
|
||||
public class HintConfirmationDialog extends DialogFragment {
|
||||
public static class HintConfirmationDialog extends DialogFragment {
|
||||
|
||||
LinkedList<IHintDialogFragmentListener> listeners = new LinkedList<>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue