From 8298506d517e6f553a940b32c14a5b020ffa1a5a Mon Sep 17 00:00:00 2001 From: Karola Marky Date: Thu, 29 Jun 2017 15:25:16 +0200 Subject: [PATCH] Old Welcome removed --- .../ui/MainActivity.java | 42 ---------- app/src/main/res/layout/welcome_dialog.xml | 77 ------------------- 2 files changed, 119 deletions(-) delete mode 100644 app/src/main/res/layout/welcome_dialog.xml diff --git a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java index 14dd28e..e1d7c43 100644 --- a/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java +++ b/app/src/main/java/org/secuso/privacyfriendlysudoku/ui/MainActivity.java @@ -63,20 +63,6 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig NewLevelManager newLevelManager = NewLevelManager.getInstance(getApplicationContext(), settings); - // Is this the very first time we start this app? - boolean firstStart = settings.getBoolean("firstStart", true); - if(firstStart) { - // preload some levels so we don't have to generate as many and we can start playing right away. - newLevelManager.loadFirstStartLevels(); - - WelcomeDialog welcomeDialog = new WelcomeDialog(); - welcomeDialog.show(getFragmentManager(), "WelcomeDialog"); - - SharedPreferences.Editor editor = settings.edit(); - editor.putBoolean("firstStart", false); - editor.commit(); - } - // check if we need to pre generate levels. newLevelManager.checkAndRestock(); @@ -431,32 +417,4 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig } } - public static class WelcomeDialog extends DialogFragment { - - @Override - public void onAttach(Activity activity) { - super.onAttach(activity); - } - - @Override - public Dialog onCreateDialog(Bundle savedInstanceState) { - - LayoutInflater i = getActivity().getLayoutInflater(); - AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); - - builder.setView(i.inflate(R.layout.welcome_dialog, null)); - builder.setIcon(R.mipmap.ic_launcher_nopfa); - builder.setTitle(getActivity().getString(R.string.app_name_long)); - builder.setPositiveButton(getActivity().getString(R.string.okay), null); - builder.setNegativeButton(getActivity().getString(R.string.view_help), new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - Intent intent = new Intent(getActivity(),HelpActivity.class); - startActivity(intent); - } - }); - - return builder.create(); - } - } } diff --git a/app/src/main/res/layout/welcome_dialog.xml b/app/src/main/res/layout/welcome_dialog.xml deleted file mode 100644 index 92acb02..0000000 --- a/app/src/main/res/layout/welcome_dialog.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file