Code example for LinearLayout

Methods: setBackgroundResource

0
    	} 
    } 
    public void clearResults() { 
    	invalidInput = false;
    	setResult(""); 
    	info_bar.setBackgroundResource(android.R.color.transparent);
    } 
     
    public void inputKey(String c) {
    	if (inputValue.length() == 2) { inputValue += c; inputValue += '-'; }
    	else if (inputValue.length() == 3) { inputValue += '-'; inputValue += c;}
    	else if (inputValue.length() <= 6) { inputValue += c; }
    	else { reportInvalidInput(true); } 
    	setInputValue(inputValue);
    } 
    public void inputKeyDelete() { 
    	if (invalidInput) { clearResults(); }
    	if (inputValue.length() == 4) { // remove an extra character so the '-' gets deleted
    		inputValue = inputValue.substring(0, inputValue.length()-2);
    	} else if (inputValue.length() > 1) {
    		inputValue = inputValue.substring(0, inputValue.length()-1);