Rename verify() method of CreateSudokuActivity so that it implements the onFinalizaDialogPositiveClick() method of the previously added interface and add the onDialogNegativeClick() method.

This commit is contained in:
uykek 2020-06-30 10:48:24 +02:00
parent 8d19a2239d
commit 3bbb6576f9
2 changed files with 8 additions and 3 deletions

View file

@ -18,13 +18,14 @@ import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer;
import org.secuso.privacyfriendlysudoku.controller.qqwing.QQWing; import org.secuso.privacyfriendlysudoku.controller.qqwing.QQWing;
import org.secuso.privacyfriendlysudoku.game.GameDifficulty; import org.secuso.privacyfriendlysudoku.game.GameDifficulty;
import org.secuso.privacyfriendlysudoku.game.GameType; import org.secuso.privacyfriendlysudoku.game.GameType;
import org.secuso.privacyfriendlysudoku.ui.listener.IFinalizeDialogFragmentListener;
import org.secuso.privacyfriendlysudoku.ui.view.CreateSudokuSpecialButtonLayout; import org.secuso.privacyfriendlysudoku.ui.view.CreateSudokuSpecialButtonLayout;
import org.secuso.privacyfriendlysudoku.ui.view.R; import org.secuso.privacyfriendlysudoku.ui.view.R;
import org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout; import org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout;
import org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout; import org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout;
import org.secuso.privacyfriendlysudoku.ui.view.SudokuSpecialButtonLayout; import org.secuso.privacyfriendlysudoku.ui.view.SudokuSpecialButtonLayout;
public class CreateSudokuActivity extends BaseActivity { public class CreateSudokuActivity extends BaseActivity implements IFinalizeDialogFragmentListener {
GameController gameController; GameController gameController;
SudokuFieldLayout layout; SudokuFieldLayout layout;
@ -109,7 +110,7 @@ public class CreateSudokuActivity extends BaseActivity {
super.onBackPressed(); super.onBackPressed();
} }
private void verify() { public void onFinalizeDialogPositiveClick() {
Toast.makeText(CreateSudokuActivity.this, "Verifying...", Toast.LENGTH_SHORT).show(); Toast.makeText(CreateSudokuActivity.this, "Verifying...", Toast.LENGTH_SHORT).show();
GameType gameType = gameController.getGameType(); GameType gameType = gameController.getGameType();
int boardSize = gameType.getSize() * gameType.getSize(); int boardSize = gameType.getSize() * gameType.getSize();
@ -130,4 +131,8 @@ public class CreateSudokuActivity extends BaseActivity {
} }
} }
public void onDialogNegativeClick() {
}
} }

View file

@ -1,6 +1,6 @@
package org.secuso.privacyfriendlysudoku.ui.listener; package org.secuso.privacyfriendlysudoku.ui.listener;
public interface IFinalizeDialogFragmentListener { public interface IFinalizeDialogFragmentListener {
public void onFinalizeDialogPositiveClick(String input); public void onFinalizeDialogPositiveClick();
public void onDialogNegativeClick(); public void onDialogNegativeClick();
} }