Add back button to CreateSudokuActivity
This commit is contained in:
parent
07552a1089
commit
762d7d19a2
1 changed files with 12 additions and 0 deletions
|
@ -34,6 +34,7 @@ import android.widget.TextView;
|
|||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
|
||||
import org.secuso.privacyfriendlysudoku.controller.GameController;
|
||||
import org.secuso.privacyfriendlysudoku.controller.Symbol;
|
||||
|
@ -89,6 +90,11 @@ public class CreateSudokuActivity extends BaseActivity implements IFinalizeDialo
|
|||
private void setUpLayout() {
|
||||
|
||||
setContentView(R.layout.activity_create_sudoku);
|
||||
|
||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||
setSupportActionBar(toolbar);
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
layout = (SudokuFieldLayout)findViewById(R.id.sudokuLayout);
|
||||
layout.setSettingsAndGame(sharedPref, gameController);
|
||||
|
||||
|
@ -113,6 +119,12 @@ public class CreateSudokuActivity extends BaseActivity implements IFinalizeDialo
|
|||
gameController.notifyHighlightChangedListeners();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onSupportNavigateUp() {
|
||||
onBackPressed();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume(){
|
||||
super.onResume();
|
||||
|
|
Loading…
Reference in a new issue