Code example for Formatter

Methods: close, format

0
        //sndView.setLevel(0,0); 
        updateDisplay(0.0); 
    } 
 
    private void updateDisplay(double signalEMA) {
		Formatter formatter = new Formatter();
		sndTxt.setText(formatter.format("%03.1f", signalEMA).toString());
		formatter.close();
        //sndView.setLevel((int)signalEMA, mThreshold); 
    } 
 
	// ----------------- SETTERS, NOTIFICATIONS, MISC ----------------- \\ 
	// Sets the header of the app 
	// Defaults to DATE - ENTRY # 
	private void setHeader(String str){
		header.setText(str);
		if ("".equals(str))
			header.setText(dateStr().split("_")[0] + " - Entry " + entryNum);
	} 
 
	// Creates a notification in the center