List of usage examples for android.preference ListPreference setShouldDisableView
public void setShouldDisableView(boolean shouldDisableView)
From source file:com.android.leanlauncher.SettingsActivity.java
private void displayIconThemePref(ListPreference lpIconSetting) { ArrayMap<String, String> iconPacks = LauncherAppState.getInstance().getIconCache().getAvailableIconPacks(); if (iconPacks != null && iconPacks.size() != 0) { String iconPackValues[] = iconPacks.keySet().toArray(new String[iconPacks.size() + 1]); iconPackValues[iconPacks.size()] = ""; String[] iconPackTitles = new String[iconPacks.size() + 1]; for (int i = 0; i < iconPacks.size(); i++) { iconPackTitles[i] = iconPacks.get(iconPacks.keyAt(i)); }/*from w w w . j a v a2 s . co m*/ iconPackTitles[iconPacks.size()] = getString(R.string.pref_no_icon_theme); lpIconSetting.setEntries(iconPackTitles); lpIconSetting.setEntryValues(iconPackValues); } else { lpIconSetting.setEnabled(false); lpIconSetting.setShouldDisableView(true); lpIconSetting.setSummary(R.string.pref_icon_theme_summary_disabled); } }