• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java BooleanPreference类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中info.metadude.android.typedpreferences.BooleanPreference的典型用法代码示例。如果您正苦于以下问题:Java BooleanPreference类的具体用法?Java BooleanPreference怎么用?Java BooleanPreference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

BooleanPreference类属于info.metadude.android.typedpreferences包,在下文中一共展示了BooleanPreference类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: PreferencesHelper

点赞 3

import info.metadude.android.typedpreferences.BooleanPreference; //导入依赖的package包/类
public PreferencesHelper(final SharedPreferences sharedPreferences) {
    mCityNamePreference = new StringPreference(
            sharedPreferences, Preferences.KEY_CITY_NAME);
    mLastKnownLocationCenterPreference = new GeoPointPreference(
            sharedPreferences, Preferences.KEY_LAST_KNOWN_LOCATION_CENTER);
    mLastKnownLocationBoundingBoxPreference = new BoundingBoxPreference(
            sharedPreferences, Preferences.KEY_LAST_KNOWN_LOCATION_BOUNDING_BOX);
    mZoomLevelPreference = new FloatPreference(
            sharedPreferences, Preferences.KEY_ZOOM_LEVEL);
    mZoneIsDrawablePreference = new BooleanPreference(
            sharedPreferences, Preferences.KEY_ZONE_IS_DRAWABLE);
    mCityNameFrankfurtInPreferencesFixedPreference = new BooleanPreference(
            sharedPreferences, Preferences.KEY_CITY_NAME_FRANKFURT_IN_PREFERENCES_FIXED);
    mDidParseZoneDataAfterUpdate250Preference = new BooleanPreference(
            sharedPreferences, Preferences.KEY_DID_PARSE_ZONE_DATA_AFTER_UPDATE_250);
}
 

开发者ID:johnjohndoe,
项目名称:Umweltzone,
代码行数:17,
代码来源:PreferencesHelper.java

示例2: showIntroductionIfNotShownBefore

点赞 2

import info.metadude.android.typedpreferences.BooleanPreference; //导入依赖的package包/类
private void showIntroductionIfNotShownBefore() {
    final BooleanPreference introductionAlreadyShownPreference = new BooleanPreference(
            sharedPreferences, SharedPrefsKeys.INTRODUCTION_ALREADY_SHOWN);

    if (introductionAlreadyShownPreference.isSet() &&
            introductionAlreadyShownPreference.get()) {
        return;
    }

    LayoutInflater factory = LayoutInflater.from(activity);
    AlertDialog.Builder builder = new AlertDialog.Builder(activity);

    final View view = factory.inflate(R.layout.view_introduction, null);
    builder.setView(view);

    DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
            switch (which) {
                case DialogInterface.BUTTON_POSITIVE:
                    introductionAlreadyShownPreference.set(true);
                    break;
            }
        }
    };

    builder.setPositiveButton(R.string.ok, dialogClickListener);
    builder.setCancelable(false);
    builder.show();

    return;
}
 

开发者ID:criticalmaps,
项目名称:criticalmaps-android,
代码行数:33,
代码来源:PrerequisitesChecker.java

示例3: provideMuzeiIntegrationPref

点赞 2

import info.metadude.android.typedpreferences.BooleanPreference; //导入依赖的package包/类
@Provides @Singleton
BooleanPreference provideMuzeiIntegrationPref(
        Application application,
        SharedPreferences sharedPreferences) {
    return new BooleanPreference(sharedPreferences, application.getString(R.string.pref_key_muzei_integration), false);
}
 

开发者ID:tasomaniac,
项目名称:MuzeiHistory,
代码行数:7,
代码来源:DataModule.java

示例4: authenticated

点赞 2

import info.metadude.android.typedpreferences.BooleanPreference; //导入依赖的package包/类
@NonNull
public BooleanPreference authenticated() {
    return new BooleanPreference(serverPreferences, Keys.BACKEND_AUTHENTICATED);
}
 

开发者ID:hawkular,
项目名称:hawkular-android-client,
代码行数:5,
代码来源:Preferences.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)