I\'m using 3 AutocompleteTextViews to suggest entries from a database. I subclassed AutocompleteTextView to handle setting the default text to null when clicked and setting
Instead of using this
as the listener, create a new listener class and give it your autocomplete textview:
public class MyActivity extends Activity {
// .... somewhere
from_auto_complete.setOnItemClickListener(new MyClickListener(from_auto_complete));
private class MyClickListener implements OnClickListener {
AutoCompleteTextView autoComplete;
MyClickListener(AutoCompleteTextView actv) {
autoComplete = actv;
}
// ... handle clicks
}
}