Code example for AutoCompleteTextView

Methods: getAdaptersetText

0
 
 
 
	public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {	
			ArrayAdapter<String>adapterPwd=(ArrayAdapter<String>) actvPwd.getAdapter();
			ArrayAdapter<String>adapterUrls=(ArrayAdapter<String>) actvUrl.getAdapter();
			String pwd, url;
			pwd=adapterPwd.getItem((int) id);
			url=adapterUrls.getItem((int) id);
			actvPwd.setText(pwd);
			actvUrl.setText(url);
			Log.i(this.getClass().getSimpleName(),"Item selected at pos+"+id+" from "+parent.getClass().getSimpleName());
	} 
 
 
	public void onNothingSelected(AdapterView<?> parent) {
		// TODO Auto-generated method stub 
		 
	} 
 
Stop searching for code, let great code find you!  Add Codota to your java IDE