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 891ea49..1effafe 100644
--- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java
+++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/GameActivity.java
@@ -295,13 +295,13 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig
break;
case R.id.menu_share:
+ String codeForClipboard = "sudoku://" + gameController.getCodeOfField();
ShareBoardDialog shareDialog = new ShareBoardDialog();
- shareDialog.setDisplayCode("sudoku://" + gameController.getCodeOfField());
+ shareDialog.setDisplayCode(codeForClipboard);
shareDialog.setCopyClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// remember to include alternate code for older android versions
- String codeForClipboard = "sudoku://" + gameController.getCodeOfField();
ClipboardManager clipboard = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
if (clipboard != null) {
@@ -310,8 +310,7 @@ public class GameActivity extends BaseActivity implements NavigationView.OnNavig
Toast.makeText(GameActivity.this, R.string.copy_code_confirmation_toast,
Toast.LENGTH_LONG).show();
} else {
- //remember to replace hardcoded string
- Toast.makeText(GameActivity.this, "Cannot access clipboard",
+ Toast.makeText(GameActivity.this, R.string.copy_code_error_toast,
Toast.LENGTH_LONG).show();
}
}
diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/listener/IShareDialogFragmentListener.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/listener/IShareDialogFragmentListener.java
index d5c1629..c14edbd 100644
--- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/listener/IShareDialogFragmentListener.java
+++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/listener/IShareDialogFragmentListener.java
@@ -1,10 +1,5 @@
package org.secuso.privacyfriendlysudoku.ui.listener;
-import org.secuso.privacyfriendlysudoku.ui.view.databinding.DialogFragmentShareBoardBinding;
-
-/**
- * Created by Chris on 19.01.2016.
- */
public interface IShareDialogFragmentListener {
public void onShareDialogPositiveClick(String input);
public void onDialogNegativeClick();
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 3b92912..04ea1c9 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -37,6 +37,7 @@
Zurücksetzen
Sudoku teilen
In Zwischenablage gespeichert
+ Kein Zugriff auf Zwischenablage möglich
Beste Zeit:
Abgeschlossene Spiele:
Benutzte Hinweise:
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 46c67f1..5e45fd0 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -87,6 +87,7 @@
Reset
Share
Copied to clipboard
+ Cannot access clipboard