Code example for SharedPreferences.Editor: Saving app preferences

Methods: commit, putInt

0
		} 
	} 
 
	public void storeSort(Sort sort) {
		Editor editor = m_prefs.edit();
		editor.putInt(PREF_SORT, sort.getId());
		editor.commit();
	} 
 
	public Sort getSort() { 
		return Sort.getById(m_prefs.getInt(PREF_SORT,
				Sort.PRIORITY_DESC.getId())); 
	} 
 
	public void storeFilters(Collection<Priority> prios,
			Collection<?> contexts, Collection<?> projects, String search,
			Collection<?> summaries) {
		Editor editor = m_prefs.edit();
 
		if (prios != null) {
Contextual code suggestions in your IDE  Get Codota for Java