AutoCompleteTextView performFiltering?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

AutoCompleteTextView performFiltering?

Postby timhoeck » Wed Feb 25, 2009 4:15 am

I have an AutoCompleteTextView, which takes care of filtering my results.

I am attempting to implement an onscreen keyboard, but since the autocomplete will cover the keyboard, I want to delay the dropdown until after a button has been pressed.

I can tell it to showDropDown() - but then the results have not been filtered. There is a performFiltering method that is not visible. Is there anyway I can make this thing at least THINK that I have typed something, and cause it to filter the results?
timhoeck
Junior Developer
Junior Developer
 
Posts: 22
Joined: Fri Jan 16, 2009 4:41 pm

Top

Postby timhoeck » Mon Mar 02, 2009 1:52 am

I ended up cheating, and sending a space, then a delete to the text area using dispatchKeyEvent:

Code: Select all
textBox.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_SPACE));
textBox.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL));


I noticed with the MultiAutoCompleteTextView, it seems you can control the performFiltering, but it may require you to perform the custom filtering, instead of the built in one.. so I passed on that.
timhoeck
Junior Developer
Junior Developer
 
Posts: 22
Joined: Fri Jan 16, 2009 4:41 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot], Google Feedfetcher and 7 guests