From 3bbb6576f9ca397ec45258c74c067e7f6adfc97a Mon Sep 17 00:00:00 2001 From: uykek Date: Tue, 30 Jun 2020 10:48:24 +0200 Subject: [PATCH] Rename verify() method of CreateSudokuActivity so that it implements the onFinalizaDialogPositiveClick() method of the previously added interface and add the onDialogNegativeClick() method. --- .../privacyfriendlysudoku/ui/CreateSudokuActivity.java | 9 +++++++-- .../ui/listener/IFinalizeDialogFragmentListener.java | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/CreateSudokuActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/CreateSudokuActivity.java index 946b4bd..dd0e0e8 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/CreateSudokuActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/CreateSudokuActivity.java @@ -18,13 +18,14 @@ import org.secuso.privacyfriendlysudoku.controller.helper.GameInfoContainer; import org.secuso.privacyfriendlysudoku.controller.qqwing.QQWing; import org.secuso.privacyfriendlysudoku.game.GameDifficulty; 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.R; import org.secuso.privacyfriendlysudoku.ui.view.SudokuFieldLayout; import org.secuso.privacyfriendlysudoku.ui.view.SudokuKeyboardLayout; import org.secuso.privacyfriendlysudoku.ui.view.SudokuSpecialButtonLayout; -public class CreateSudokuActivity extends BaseActivity { +public class CreateSudokuActivity extends BaseActivity implements IFinalizeDialogFragmentListener { GameController gameController; SudokuFieldLayout layout; @@ -109,7 +110,7 @@ public class CreateSudokuActivity extends BaseActivity { super.onBackPressed(); } - private void verify() { + public void onFinalizeDialogPositiveClick() { Toast.makeText(CreateSudokuActivity.this, "Verifying...", Toast.LENGTH_SHORT).show(); GameType gameType = gameController.getGameType(); int boardSize = gameType.getSize() * gameType.getSize(); @@ -130,4 +131,8 @@ public class CreateSudokuActivity extends BaseActivity { } } + + public void onDialogNegativeClick() { + + } } diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/listener/IFinalizeDialogFragmentListener.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/listener/IFinalizeDialogFragmentListener.java index 3dc84fc..35eff92 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/listener/IFinalizeDialogFragmentListener.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/listener/IFinalizeDialogFragmentListener.java @@ -1,6 +1,6 @@ package org.secuso.privacyfriendlysudoku.ui.listener; public interface IFinalizeDialogFragmentListener { - public void onFinalizeDialogPositiveClick(String input); + public void onFinalizeDialogPositiveClick(); public void onDialogNegativeClick(); } \ No newline at end of file