Java PreferenceCategory.removeAll方法代码示例

本文整理汇总了Java中android.preference.PreferenceCategory.removeAll方法的典型用法代码示例。如果您正苦于以下问题:Java PreferenceCategory.removeAll方法的具体用法?Java PreferenceCategory.removeAll怎么用?Java PreferenceCategory.removeAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.preference.PreferenceCategory的用法示例。


Java PreferenceCategory.removeAll方法代码示例

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

示例1: updateSelfHostedBlogsPreferenceCategory

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
/**
 * Update the "wpcom blogs" preference category to contain a preference for each blog to configure
 * blog-specific settings.
 */
void updateSelfHostedBlogsPreferenceCategory() {
    PreferenceCategory blogsCategory = (PreferenceCategory) findPreference(getActivity().getString(R.string.pref_key_self_hosted));
    blogsCategory.removeAll();
    int order = 0;

    // Add self-hosted blog button
    Preference addBlogPreference = new Preference(getActivity());
    addBlogPreference.setTitle(R.string.add_self_hosted_blog);
    Intent intentWelcome = new Intent(getActivity(), SignInActivity.class);
    intentWelcome.putExtra(SignInActivity.START_FRAGMENT_KEY, SignInActivity.ADD_SELF_HOSTED_BLOG);
    addBlogPreference.setIntent(intentWelcome);
    addBlogPreference.setOrder(order++);
    blogsCategory.addPreference(addBlogPreference);

    // Add self hosted list
    List<Map<String, Object>> accounts = WordPress.wpDB.getAccountsBy("dotcomFlag=0", null);
    addAccounts(blogsCategory, accounts, order);
} 
开发者ID:ldsddn,项目名称:wordpress_app_android,代码行数:23,代码来源:SettingsFragment.java

示例2: addPreferenceScreenSensors

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
protected void addPreferenceScreenSensors() {
    ArrayList<DataSource> dataSources = null;
    try {
        dataSources = Configuration.getDataSources();
    } catch (FileNotFoundException e) {
        return;
    }
    String dataSourceType, platformId, dataSourceId, platformType, deviceId;
    PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference("dataSourceType");
    preferenceCategory.removeAll();
    for (int i = 0; i < dataSources.size(); i++) {
        platformId = dataSources.get(i).getPlatform().getId();
        dataSourceType = dataSources.get(i).getType();
        dataSourceId = dataSources.get(i).getId();
        platformType = dataSources.get(i).getPlatform().getType();
        deviceId = dataSources.get(i).getPlatform().getMetadata().get(METADATA.DEVICE_ID);
        Preference preference = createPreference(dataSourceType, dataSourceId, platformType, platformId, deviceId);
        preferenceCategory.addPreference(preference);
    }
} 
开发者ID:MD2Korg,项目名称:mCerebrum-AutoSense,代码行数:21,代码来源:PrefsFragmentPlot.java

示例3: emptyAndHidePreferenceCategory

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
private void emptyAndHidePreferenceCategory(int preferenceKey) {
	Preference preference = findPreference(getString(preferenceKey));
	if (!(preference instanceof PreferenceCategory))
		return;

	PreferenceCategory preferenceCategory = (PreferenceCategory) preference;
	preferenceCategory.removeAll();
	hidePreference(preferenceCategory);
} 
开发者ID:treasure-lau,项目名称:Linphone4Android,代码行数:10,代码来源:SettingsFragment.java

示例4: initAccounts

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
private void initAccounts() {
	PreferenceCategory accounts = (PreferenceCategory) findPreference(getString(R.string.pref_sipaccounts_key));
	accounts.removeAll();

	// Get already configured extra accounts
	int defaultAccountID = mPrefs.getDefaultAccountIndex();
	int nbAccounts = mPrefs.getAccountCount();
	for (int i = 0; i < nbAccounts; i++) {
		final int accountId = i;
		// For each, add menus to configure it
		String username = mPrefs.getAccountUsername(accountId);
		String domain = mPrefs.getAccountDomain(accountId);
		LedPreference account = new LedPreference(getActivity());

		if (username == null) {
			account.setTitle(getString(R.string.pref_sipaccount));
		} else {
			account.setTitle(username + "@" + domain);
		}

		if (defaultAccountID == i) {
			account.setSummary(R.string.default_account_flag);
		}

		account.setOnPreferenceClickListener(new OnPreferenceClickListener()
		{
			public boolean onPreferenceClick(Preference preference) {
				LinphoneActivity.instance().displayAccountSettings(accountId);
				return false;
			}
		});
		updateAccountLed(account, username, domain, mPrefs.isAccountEnabled(i));
		accounts.addPreference(account);
	}
} 
开发者ID:treasure-lau,项目名称:Linphone4Android,代码行数:36,代码来源:SettingsFragment.java

示例5: resetList

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
private void resetList(String preferenceCategoryKey) {
    PreferenceCategory profileCategory =
            (PreferenceCategory) getPreferenceScreen().findPreference(preferenceCategoryKey);
    if (profileCategory != null) {
        profileCategory.removeAll();
        getPreferenceScreen().removePreference(profileCategory);
    }

    mEmptyView.setVisibility(View.GONE);
} 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:11,代码来源:SavePasswordsPreferences.java

示例6: hideGPSCategory

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
private void hideGPSCategory() {
    PreferenceScreen preferenceScreen = getPreferenceScreen();
    PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference(getResources().getString(R.string.pref_gps_category));
    if (preferenceCategory != null) {
        preferenceCategory.removeAll();
        preferenceScreen.removePreference((Preference) preferenceCategory);
    }
} 
开发者ID:once2go,项目名称:mvp.recar.io,代码行数:9,代码来源:ConfigActivity.java

示例7: refreshWPComAuthCategory

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
public void refreshWPComAuthCategory() {
    PreferenceCategory wpComCategory = (PreferenceCategory) findPreference(getActivity().getString(R.string.pref_key_wpcom));
    wpComCategory.removeAll();
    addWpComSignIn(wpComCategory, 0);
    addWpComShowHideButton(wpComCategory, 5);
    List<Map<String, Object>> accounts = WordPress.wpDB.getAccountsBy("dotcomFlag = 1 AND isHidden = 0", null);
    addAccounts(wpComCategory, accounts, 10);
} 
开发者ID:ldsddn,项目名称:wordpress_app_android,代码行数:9,代码来源:SettingsFragment.java

示例8: addPreferenceScreenSensors

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
protected void addPreferenceScreenSensors() {
    String dataSourceType;
    PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference("dataSourceType");
    preferenceCategory.removeAll();
    for (int i = 0; i < phoneSensorDataSources.getPhoneSensorDataSources().size(); i++) {
        dataSourceType = phoneSensorDataSources.getPhoneSensorDataSources().get(i).getDataSourceType();
        SwitchPreference switchPreference = createSwitchPreference(dataSourceType);
        preferenceCategory.addPreference(switchPreference);
    }
} 
开发者ID:MD2Korg,项目名称:mCerebrum-PhoneSensor,代码行数:11,代码来源:PrefsFragmentSettings.java

示例9: addPreferenceScreenSensors

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
protected void addPreferenceScreenSensors() {
    String dataSourceType;
    PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference("dataSourceType");
    preferenceCategory.removeAll();
    for (int i = 0; i < phoneSensorDataSources.getPhoneSensorDataSources().size(); i++) {
        dataSourceType = phoneSensorDataSources.getPhoneSensorDataSources().get(i).getDataSourceType();
        if(!phoneSensorDataSources.getPhoneSensorDataSources().get(i).isEnabled()) continue;
        Preference preference = createPreference(dataSourceType);
        preferenceCategory.addPreference(preference);
    }
} 
开发者ID:MD2Korg,项目名称:mCerebrum-PhoneSensor,代码行数:12,代码来源:PrefsFragmentPlot.java

示例10: setConfiguredLocation

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
void setConfiguredLocation() {
    PreferenceCategory pc = (PreferenceCategory) findPreference("key_configured_location");
    pc.removeAll();
    for (int i = 0; i < geoFenceData.getGeoFenceLocationInfos().size(); i++) {
        Preference p = new Preference(getActivity());
        String l = geoFenceData.getGeoFenceLocationInfos().get(i).getLocation();
        String lo = String.valueOf(geoFenceData.getGeoFenceLocationInfos().get(i).getLongitude());
        String la = String.valueOf(geoFenceData.getGeoFenceLocationInfos().get(i).getLatitude());
        p.setKey(l);
        p.setTitle(l);
        p.setSummary("(Latitude: " + la + ", Longitude: " + lo+")");
        p.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
            @Override
            public boolean onPreferenceClick(final Preference preference) {
                Dialog.simple(getActivity(), "Delete Location", "Delete location = " + preference.getKey() + "?", "Yes", "Cancel", new DialogCallback() {
                    @Override
                    public void onSelected(String value) {
                        if ("Yes".equals(value)) {
                            geoFenceData.delete(preference.getKey());
                            createPreferenceScreen();
                        }
                    }
                }).show();
                return true;
            }
        });
        pc.addPreference(p);
    }
} 
开发者ID:MD2Korg,项目名称:mCerebrum-PhoneSensor,代码行数:30,代码来源:PrefsFragmentSettingsGeofence.java

示例11: resetList

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
private void resetList(String preferenceCategoryKey) {
    PreferenceCategory profileCategory =
            (PreferenceCategory) getPreferenceScreen().findPreference(preferenceCategoryKey);
    if (profileCategory != null) {
        profileCategory.removeAll();
        getPreferenceScreen().removePreference(profileCategory);
    }
} 
开发者ID:mogoweb,项目名称:365browser,代码行数:9,代码来源:SavePasswordsPreferences.java

示例12: setupAppInstall

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
private void setupAppInstall() {
    PreferenceCategory preferenceCategory = (PreferenceCategory) findPreference("key_app");
    preferenceCategory.removeAll();
    for (int i = 0; i < appInstallManager.getAppInstallList().size(); i++) {
        ListPreference listPreference = new ListPreference(getActivity());
        listPreference.setTitle(appInstallManager.getAppInstallList().get(i).getName());
        listPreference.setKey(appInstallManager.getAppInstallList().get(i).getName());
        setEntries(listPreference, appInstallManager.getAppInstallList().get(i));
        final int finalI = i;
        listPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {
            @Override
            public boolean onPreferenceChange(Preference preference, Object newValue) {
                if (newValue.equals("Install") || newValue.equals("Update")) {
                    appInstallManager.install(getActivity(), finalI, onCompletionListener);

                } else if (newValue.equals("Run")) {
                    appInstallManager.getAppInstallList().get(finalI).run(context);
                } else if (newValue.equals("Uninstall")) {
                    appInstallManager.uninstall(finalI,onCompletionListener);
                } else if(newValue.equals("Permission")){
                    appInstallManager.permission(finalI,onCompletionListener);
                }
                return false;
            }
        });
        preferenceCategory.addPreference(listPreference);
        updatePreference(appInstallManager.getAppInstallList().get(i));
    }
} 
开发者ID:MD2Korg,项目名称:mCerebrum-Study,代码行数:30,代码来源:PrefsFragmentInstallApp.java

示例13: setupPreferenceScreenConfigured

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
private void setupPreferenceScreenConfigured() {
    PreferenceCategory category = (PreferenceCategory) findPreference("autosense_configured");
    category.removeAll();
    for (int i = 0; i < autoSensePlatforms.size(); i++) {
        Preference preference = new Preference(getActivity());
        preference.setIcon(R.drawable.ic_chest_teal_48dp);

        preference.setTitle(autoSensePlatforms.get(i).getDeviceId());
        preference.setSummary(autoSensePlatforms.get(i).getPlatformId());
        preference.setKey(autoSensePlatforms.get(i).getDeviceId());
        preference.setOnPreferenceClickListener(configuredListener());
        category.addPreference(preference);
    }
} 
开发者ID:MD2Korg,项目名称:mCerebrum-AutoSense,代码行数:15,代码来源:PrefsFragmentSettings.java

示例14: clearNotificationApplications

import android.preference.PreferenceCategory; //导入方法依赖的package包/类
public void clearNotificationApplications() {
    Log.d(LOG_TAG, "Clearing listening apps");
    PreferenceCategory category = (PreferenceCategory) findPreference("preference_category_apps");
    category.removeAll();
    appManager.clearNotificationApplications();
} 
开发者ID:jareddlc,项目名称:OpenFit,代码行数:7,代码来源:OpenFitActivity.java

本文标签属性:

示例:示例是什么意思

代码:代码编程

java:javascript什么意思

PreferenceCategory:PreferenceCategory

removeAll:removeall方法

上一篇:全网永封是多久(scp基金会为什么会被封禁?)(《gta5》为什么被全网封了)
下一篇:刘浩龙个人资料简历 刘浩龙简介(刘浩龙既生平)

为您推荐