From 364bb807789d428e96d33905db3eb01c651a1f28 Mon Sep 17 00:00:00 2001 From: uykek Date: Sun, 30 Aug 2020 11:11:22 +0200 Subject: [PATCH] Make the ShareBoardFragment's text view ineditable --- .../org/secuso/privacyfriendlysudoku/ui/GameActivity.java | 5 +++-- app/src/main/res/layout/dialog_fragment_share_board.xml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java index a280a80..dc20eb6 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java @@ -129,8 +129,6 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig @Override protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this); /* @@ -147,6 +145,8 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); } + super.onCreate(savedInstanceState); + GameType gameType = GameType.Unspecified; GameDifficulty gameDifficulty = GameDifficulty.Unspecified; int loadLevelID = 0; @@ -712,6 +712,7 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig DialogFragmentShareBoardBinding binding = DialogFragmentShareBoardBinding.inflate(inflater); binding.ver3DisplaySudokuTextView.setText(displayCode); + binding.ver3DisplaySudokuTextView.setEnabled(false); binding.ver3CopySudokuToClipboardButton.setOnClickListener(copyClickListener); builder.setView(binding.getRoot()); diff --git a/app/src/main/res/layout/dialog_fragment_share_board.xml b/app/src/main/res/layout/dialog_fragment_share_board.xml index f6d811f..ca9697b 100644 --- a/app/src/main/res/layout/dialog_fragment_share_board.xml +++ b/app/src/main/res/layout/dialog_fragment_share_board.xml @@ -33,6 +33,7 @@ android:layout_marginRight="8dp" android:ems="10" android:inputType="textPersonName" + android:textColor="?attr/standardVectorGraphic" app:layout_constraintBottom_toBottomOf="@+id/ver3_copy_sudoku_to_clipboard_button" app:layout_constraintEnd_toStartOf="@+id/ver3_copy_sudoku_to_clipboard_button" app:layout_constraintStart_toStartOf="parent"