indianpoptart / RadioControl

An app that auto toggles wifi and cell radio for maximum battery life
https://nikhilp.org/radiocontrol
GNU General Public License v3.0
16 stars 7 forks source link

Easter egg and link speed #9

Closed indianpoptart closed 8 years ago

indianpoptart commented 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);
}
indianpoptart commented 8 years ago

Done in alpha4