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 37816de..de5dbde 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/CreateSudokuActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/CreateSudokuActivity.java @@ -3,11 +3,21 @@ package org.secuso.privacyfriendlysudoku.ui; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; +import android.view.View; import android.view.WindowManager; +import org.secuso.privacyfriendlysudoku.controller.Symbol; 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 { + + SudokuFieldLayout layout; + SudokuKeyboardLayout keyboard; + SudokuSpecialButtonLayout specialButtonLayout; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -19,4 +29,30 @@ public class CreateSudokuActivity extends BaseActivity { setContentView(R.layout.activity_game_view); } + + @Override + public void onResume(){ + super.onResume(); + + View mainContent = findViewById(R.id.main_content); + if (mainContent != null) { + mainContent.animate().alpha(1).setDuration(MAIN_CONTENT_FADEOUT_DURATION); + } + + SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); + Symbol s; + try { + s = Symbol.valueOf(sharedPref.getString("pref_symbols", Symbol.Default.name())); + } catch(IllegalArgumentException e) { + s = Symbol.Default; + } + layout.setSymbols(s); + keyboard.setSymbols(s); + } + + @Override + public void onBackPressed() { + finish(); + super.onBackPressed(); + } }