Android Open Source - FAST Android F A S T Settings






From Project

Back to project page FAST.

License

The source code is released under:

GNU General Public License

If you think the Android project FAST 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 org.ligi.fast.settings;
/*  w  w  w .  j a  v a 2 s  . c o  m*/
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

/**
 * Class to handle the Preferences
 */
public class AndroidFASTSettings implements FASTSettings {

    public static final String DEFUAULT_SORT_ORDER = "unsorted";
    public static final String DEFUAULT_THEME = "dark";
    public static final String DEFUAULT_ICONSIZE = "medium";
    public static final String DEFUAULT_ICON_RESOLUTION = "96";
    private final SharedPreferences mSharedPreferences;

    public AndroidFASTSettings(Context ctx) {
        mSharedPreferences = PreferenceManager.getDefaultSharedPreferences(ctx);
    }

    public boolean isLaunchSingleActivated() {
        return mSharedPreferences.getBoolean(KEY_LAUNCHSINGLE, true);
    }

    public boolean isSearchPackageActivated() {
        return mSharedPreferences.getBoolean(KEY_SEARCHPKG, true);
    }

    public boolean isUmlautConvertActivated() {
        return mSharedPreferences.getBoolean(KEY_UMLAUTCONVERT, true);
    }

    public boolean isMarketForAllActivated() {
        return mSharedPreferences.getBoolean(KEY_MARKETFORALL, false);
    }

    public boolean isIgnoreSpaceAfterQueryActivated() {
        return mSharedPreferences.getBoolean(KEY_IGNORESPACEAFTERQUERY, true);
    }


    public boolean isFinishOnLaunchEnabled() {
        return mSharedPreferences.getBoolean(KEY_FINISH_ON_LAUNCH, true);
    }

    @Override
    public boolean isShowKeyBoardOnStartActivated() {
        return mSharedPreferences.getBoolean(KEY_SHOWKEYBOARDONSTART, true);
    }

    public boolean isTextOnlyActivated() {
        return mSharedPreferences.getBoolean(KEY_TEXTONLY, false);
    }

    public int getMaxLines() {
        return Integer.parseInt(mSharedPreferences.getString(KEY_MAXLINES, "1"));
    }

    @Override
    public int getIconResolution() {
        return Integer.parseInt(mSharedPreferences.getString(KEY_ICONRES, DEFUAULT_ICON_RESOLUTION));
    }

    public String getIconSize() {
        return mSharedPreferences.getString(KEY_ICONSIZE, DEFUAULT_ICONSIZE);
    }

    public String getTheme() {
        return mSharedPreferences.getString(KEY_THEME, DEFUAULT_THEME);
    }

    public String getSortOrder() {
        return mSharedPreferences.getString(KEY_SORT, DEFUAULT_SORT_ORDER);
    }

    public boolean isGapSearchActivated() {
        return mSharedPreferences.getBoolean(KEY_GAP_SEARCH, true);
    }

}




Java Source Code List

org.ligi.axt.helpers.ActivityHelper.java
org.ligi.axt.helpers.ContextHelper.java
org.ligi.axt.helpers.FileHelper.java
org.ligi.axt.helpers.ResolveInfoHelper.java
org.ligi.axt.helpers.ViewHelper.java
org.ligi.axt.simplifications.SimpleTextWatcher.java
org.ligi.fast.App.java
org.ligi.fast.TargetStore.java
org.ligi.fast.TargetStore.java
org.ligi.fast.TargetStore.java
org.ligi.fast.background.AppInstallOrRemoveReceiver.java
org.ligi.fast.background.BackgroundGatherAsyncTask.java
org.ligi.fast.background.BaseAppGatherAsyncTask.java
org.ligi.fast.model.AppIconCache.java
org.ligi.fast.model.AppInfoList.java
org.ligi.fast.model.AppInfoSortByLabelComparator.java
org.ligi.fast.model.AppInfoSortByMostUsedComparator.java
org.ligi.fast.model.AppInfo.java
org.ligi.fast.model.DynamicAppInfoList.java
org.ligi.fast.settings.AndroidFASTSettings.java
org.ligi.fast.settings.FASTSettings.java
org.ligi.fast.testing.AppInfoTestBase.java
org.ligi.fast.testing.MutableFastSettings.java
org.ligi.fast.testing.TheAppIconCache.java
org.ligi.fast.testing.TheAppInfoStore.java
org.ligi.fast.testing.TheAppInfo.java
org.ligi.fast.testing.TheSearchActivity.java
org.ligi.fast.ui.AppActionDialogBuilder.java
org.ligi.fast.ui.AppInfoAdapter.java
org.ligi.fast.ui.FASTSettingsActivity.java
org.ligi.fast.ui.HelpDialog.java
org.ligi.fast.ui.HelpDialog.java
org.ligi.fast.ui.IconDimensions.java
org.ligi.fast.ui.LoadingDialog.java
org.ligi.fast.ui.SearchActivity.java
org.ligi.fast.util.AppInfoListStore.java
org.ligi.fast.util.PackageListSerializer.java
org.ligi.fast.util.StringUtils.java
org.ligi.fast.util.UmlautConverter.java