I tried setting the adapter to null, and it actually works. The code looks
like this:

searchInput.setAdapter((ArrayAdapter<String>) null);
searchInput.setText(text);
searchInput.setAdapter(adapter);

I also use this technique to disable the autocomplete that kicks in when
changing orientation....however this works almost everytime...it still shows
the drop down once in a while.
I´m happy the solution sorta works for now, but it dosn't feel like an
optimal solution. It would be nice if the AutoCompleteTextView would be able
to support it a bit better. Maybe an extra argument to setText? But anyways,
thank you for your help Mark!

On Sat, Dec 5, 2009 at 11:27 AM, Klaus Kartou <[email protected]> wrote:

> I have tried setting the contents of the adapter to an empty array, but
> that didn't help. Ok, setting the adapter to null might give different
> results, ill try that and come back with the result. Thanks!
>
> On Dec 5, 2009 11:22 AM, "Mark Murphy" <[email protected]> wrote:
>
> > Yes and it works, but I need be able to call setText() at any time, eg >
> when > the user presses ...
> On the button click, try setting the adapter to null, set the text, then
> set the adapter back to its original value.
>
> --
>
> Mark Murphy (a Commons Guy) http://commonsware.com Android App Developer
> Books: http://commonsware.c...
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to