Android Open Source - AURHelperDroid Prefs






From Project

Back to project page AURHelperDroid.

License

The source code is released under:

Apache License

If you think the Android project AURHelperDroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.stomachion.aurhelperdroid.utils;
/*w w  w  . ja v  a2  s  .  c om*/
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

/**
 * User: Pedro Veloso
 */
public class Prefs {

    /**
     * @param ctx app context
     * @return True if this is the first time the app is initialized, False otherwise
     */
    public static boolean getIsFirstTime(Context ctx) {
        SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(ctx);
        return settings.getBoolean(Constants.PREF_FIRST_TIME, true);
    }

    public static void setIsFirstTime(Context ctx, boolean newValue) {
        SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(ctx);
        SharedPreferences.Editor editor = settings.edit();
        editor.putBoolean(Constants.PREF_FIRST_TIME, newValue);
        editor.commit();
    }
}




Java Source Code List

com.stomachion.aurhelperdroid.activities.MainActivity.java
com.stomachion.aurhelperdroid.activities.PreferencesActivity.java
com.stomachion.aurhelperdroid.adapters.NewsAdapter.java
com.stomachion.aurhelperdroid.fallbacksupport.ActivityHostFragment.java
com.stomachion.aurhelperdroid.fallbacksupport.LocalActivityManagerFragment.java
com.stomachion.aurhelperdroid.fragments.AboutFrag.java
com.stomachion.aurhelperdroid.fragments.NewsRSSFrag.java
com.stomachion.aurhelperdroid.fragments.PreferencesFrag.java
com.stomachion.aurhelperdroid.fragments.SearchFrag.java
com.stomachion.aurhelperdroid.logic.NewsItem.java
com.stomachion.aurhelperdroid.network.InternetState.java
com.stomachion.aurhelperdroid.parser.MainRssParser.java
com.stomachion.aurhelperdroid.parser.RssNewsHandler.java
com.stomachion.aurhelperdroid.utils.CommonUtils.java
com.stomachion.aurhelperdroid.utils.Constants.java
com.stomachion.aurhelperdroid.utils.Prefs.java