I have an AutoCompleteTextView, and it works nicely, until I add a space to my input. If i had, say, a list of many historical events (Battle of Britain (1940), Battle of the Bulge (1944), [insert lots of battles], Napoleon's fatal march (1812), [insert lots other historical events]).
When I enter "Battle" or "battle", I get a list of all battles (although it seems there is a max), and when I enter "britain", the "Battle of Britain (1940)" appears in the results. However, when I enter a space after "Battle", all result entries disappear.
I read can't really find any helpful posts or questions regarding this topic besides this, but that didn't give me any answers.
Is there a way to have the AutoCompleteTextView keep autocompleting after the insertion of a space?
Edit: I don't really see the point of adding code, as it's just an AutoCompleteTextView with an Adapter with Strings, but alright, this happens in onCreate()
:
auto = (AutoCompleteTextView) findViewById(R.id.auto);
String[] events = getListOfEvents();
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, events);
auto.setAdapter(adapter);
where getListOfEvents()
simply reads an puts all historical events in a String[]