Set GameType text view in CreateSudokuActivity

This commit is contained in:
uykek 2020-06-30 15:33:27 +02:00
parent bf4f839cae
commit 360847f99d

View file

@ -8,6 +8,7 @@ import android.preference.PreferenceManager;
import android.view.View; import android.view.View;
import android.view.WindowManager; import android.view.WindowManager;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast; import android.widget.Toast;
import androidx.appcompat.app.AppCompatDelegate; import androidx.appcompat.app.AppCompatDelegate;
@ -32,7 +33,8 @@ public class CreateSudokuActivity extends BaseActivity implements IFinalizeDialo
GameController gameController; GameController gameController;
SudokuFieldLayout layout; SudokuFieldLayout layout;
SudokuKeyboardLayout keyboard; SudokuKeyboardLayout keyboard;
SudokuSpecialButtonLayout specialButtonLayout; TextView viewName ;
CreateSudokuSpecialButtonLayout specialButtonLayout;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { 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); keyboard.setKeyBoard(gameController.getSize(), p.x,layout.getHeight()-p.y, orientation);
CreateSudokuSpecialButtonLayout createSudokuSpecialButtonLayout = (CreateSudokuSpecialButtonLayout) findViewById(R.id.createSudokuLayout); specialButtonLayout = (CreateSudokuSpecialButtonLayout) findViewById(R.id.createSudokuLayout);
createSudokuSpecialButtonLayout.setButtons(p.x, gameController, keyboard, getFragmentManager(), orientation, CreateSudokuActivity.this, this); 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(); gameController.notifyHighlightChangedListeners();