From 360847f99d42903b7f29a18bf95021626b62257e Mon Sep 17 00:00:00 2001 From: uykek Date: Tue, 30 Jun 2020 15:33:27 +0200 Subject: [PATCH] Set GameType text view in CreateSudokuActivity --- .../ui/CreateSudokuActivity.java | 11 ++++++++--- 1 file 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 a5b2768..8af4afb 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/CreateSudokuActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/CreateSudokuActivity.java @@ -8,6 +8,7 @@ import android.preference.PreferenceManager; import android.view.View; import android.view.WindowManager; import android.widget.LinearLayout; +import android.widget.TextView; import android.widget.Toast; import androidx.appcompat.app.AppCompatDelegate; @@ -32,7 +33,8 @@ public class CreateSudokuActivity extends BaseActivity implements IFinalizeDialo GameController gameController; SudokuFieldLayout layout; SudokuKeyboardLayout keyboard; - SudokuSpecialButtonLayout specialButtonLayout; + TextView viewName ; + CreateSudokuSpecialButtonLayout specialButtonLayout; @Override protected void onCreate(Bundle savedInstanceState) { @@ -79,8 +81,11 @@ public class CreateSudokuActivity extends BaseActivity implements IFinalizeDialo keyboard.setKeyBoard(gameController.getSize(), p.x,layout.getHeight()-p.y, orientation); - CreateSudokuSpecialButtonLayout createSudokuSpecialButtonLayout = (CreateSudokuSpecialButtonLayout) findViewById(R.id.createSudokuLayout); - createSudokuSpecialButtonLayout.setButtons(p.x, gameController, keyboard, getFragmentManager(), orientation, CreateSudokuActivity.this, this); + specialButtonLayout = (CreateSudokuSpecialButtonLayout) findViewById(R.id.createSudokuLayout); + specialButtonLayout.setButtons(p.x, gameController, keyboard, getFragmentManager(), orientation, CreateSudokuActivity.this, this); + + viewName = (TextView) findViewById(R.id.gameModeText); + viewName.setText(getString(gameController.getGameType().getStringResID())); gameController.notifyHighlightChangedListeners();