Fix bug that caused navigation bar item "import sudoku" to be selected instead of "main menu" after cancelling the ImportBoardDialog in the MainActivity.
This commit is contained in:
parent
8780dcf640
commit
ec40f340e6
1 changed files with 4 additions and 2 deletions
|
@ -474,7 +474,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDialogNegativeClick() {
|
public void onDialogNegativeClick() {
|
||||||
|
mNavigationView.setCheckedItem(R.id.nav_newgame_main);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ImportBoardDialog extends DialogFragment {
|
public static class ImportBoardDialog extends DialogFragment {
|
||||||
|
@ -505,7 +505,9 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
||||||
})
|
})
|
||||||
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
// User cancelled the dialog
|
for(IImportDialogFragmentListener l : listeners) {
|
||||||
|
l.onDialogNegativeClick();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return builder.create();
|
return builder.create();
|
||||||
|
|
Loading…
Reference in a new issue