Code example for AutoCompleteTextView

Methods: setText, getWindowToken

0
configButton.setOnClickListener(new OnClickListener() {
 
			public void onClick(View v) {
				InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
				imm.hideSoftInputFromWindow(vehicleField.getWindowToken(), 0);
				imm.hideSoftInputFromWindow(driverField.getWindowToken(), 0);
				vehicleField.setText("");
				driverField.setText("");
				if(loginScreeninvoker==2)
				{ 
					loggedIn(); 
				} 
 
			} 
		}); 
 
		/*		Criteria criteria = new Criteria(); 
		criteria.setAccuracy(Criteria.ACCURACY_FINE); 
		criteria.setAltitudeRequired(false); 
		criteria.setBearingRequired(true);