Home | History | Annotate | Download | only in settings

Lines Matching full:preference

46 import android.preference.Preference;
47 import android.preference.PreferenceActivity.Header;
48 import android.preference.PreferenceFrameLayout;
49 import android.preference.PreferenceGroup;
78 * Set the preference's title to the matching activity's label.
89 * to specify the icon that should be displayed for the preference.
95 * to specify the title that should be displayed for the preference.
101 * to specify the summary text that should be displayed for the preference.
106 * Finds a matching activity for a preference's intent. If a matching
107 * activity is not found, it will remove the preference.
110 * @param parentPreferenceGroup The preference group that contains the
111 * preference whose intent is being resolved.
112 * @param preferenceKey The key of the preference whose intent is being
117 * @return Whether an activity was found. If false, the preference was
123 Preference preference = parentPreferenceGroup.findPreference(preferenceKey);
124 if (preference == null) {
128 Intent intent = preference.getIntent();
140 preference.setIntent(new Intent().setClassName(
145 // Set the preference title to the activity's label
146 preference.setTitle(resolveInfo.loadLabel(pm));
154 // Did not find a matching activity, so remove the preference
155 parentPreferenceGroup.removePreference(preference);
161 * Finds a matching activity for a preference's intent. If a matching
162 * activity is not found, it will remove the preference. The icon, title and
163 * summary of the preference will also be updated with the values retrieved
165 * specified then the preference title will be set to match the label of the
169 * @param parentPreferenceGroup The preference group that contains the
170 * preference whose intent is being resolved.
171 * @param preferenceKey The key of the preference whose intent is being
174 * @return Whether an activity was found. If false, the preference was
184 IconPreferenceScreen preference = (IconPreferenceScreen)parentPreferenceGroup
186 if (preference == null) {
190 Intent intent = preference.getIntent();
221 // Set the preference title to the activity's label if no
227 // Set icon, title and summary for the preference
228 preference.setIcon(icon);
229 preference.setTitle(title);
230 preference.setSummary(summary);
233 preference.setIntent(new Intent().setClassName(
242 // Did not find a matching activity, so remove the preference
243 parentPreferenceGroup.removePreference(preference);
282 // Set the preference title to the activity's label if no
288 // Set icon, title and summary for the preference
302 // Did not find a matching activity, so remove the preference