Closed indianpoptart closed 8 years ago
private static final String PRIVATE_PREF = "prefs";
SharedPreferences sp = getSharedPreferences(PRIVATE_PREF, Context.MODE_PRIVATE); //Initializes prefs.xml SharedPreferences.Editor editor = sp.edit();//Initializes xml editor editor.putBoolean("isEasterEgg", true); //Puts the boolean into prefs.xml editor.commit(); //Ends writing to prefs file
//Check if the easter egg is NOT activated if(!sharedPref.getBoolean("isEasterEgg",0)){ btn3.setVisibility(View.GONE); }
Done in alpha4