Code example for SearchRecentSuggestions

Methods: clearHistory

0
			CheckBoxPreference p = (CheckBoxPreference) findPreference(key);
			Preference cle = findPreference("pref_search_clear");
			cle.setEnabled(p.isChecked());
			if(!p.isChecked()) {
				/* clear the entries */ 
				suggestions.clearHistory();
			} 
		} else if(key.equals("pref_gen_notif")) {
			CheckBoxPreference not = (CheckBoxPreference) this.findPreference("pref_gen_notif");
			//TimePreference tp = (TimePreference) this.findPreference("pref_gen_notif_refresh"); 
			//tp.setEnabled(not.isChecked()); 
		} 
	} 
	 
	@Override 
	public void onResume() { 
		super.onResume(); 
		getPreferenceScreen().getSharedPreferences()
		.registerOnSharedPreferenceChangeListener(this);
		CheckBoxPreference sea = (CheckBoxPreference) this.findPreference(KEY_ALLOW_RECENT);
Stop searching for code, let great code find you!  Add Codota to your java IDE