Code example for Preferences

Methods: put

0
	public void saveQuery(final String query) {
		prefs.put(SAVED_QUERY, query);
	} 
 
	public void saveLoadedFile(final String absolutePath) {
		prefs.put(LOADED_FILE, absolutePath);
	} 
 
	public boolean hasLoadedFile() { 
		String file = prefs.get(LOADED_FILE, null);
		return file != null;
	} 
 
	public String getLoadedFile() {
		return prefs.get(LOADED_FILE, null);
	} 
 
	public boolean hasQuery() { 
		String query = prefs.get(SAVED_QUERY, null);
		return query != null;
	}