-1

i have a problem with AutoCompleteTextView.
I use it in several activities, it works just fine with all of them but one, which is a dialog themed activity.
in this specific activity, the suggestion list doesn't show at all
this is my code:

<AutoCompleteTextView android:layout_height="wrap_content" android:id="@+id/etTesterName" android:completionThreshold="1" android:gravity="center" android:layout_width="fill_parent" android:layout_weight="1"></AutoCompleteTextView>

mTestersList = new ArrayList<Testers>();
mAdapter = new ArrayAdapter<Testers>(this, android.R.layout.simple_dropdown_item_1line, mTestersList);
((AutoCompleteTextView) findViewById(R.id.etTesterName)).setAdapter(mAdapter);
...
mTestersList = result;
mAdapter.notifyDataSetChanged();

mTestersList, is a list of Testers class which has the toString() overrided. this code works for all my activities but the dialog themed on..anyone has an idea why?

Vlad

Vlad
  • 735
  • 2
  • 10
  • 19

1 Answers1

0

hold reference of (AutoCompleteTextView) in some pointer that has visibility in activity:

AutoCompleteTextView autoCompleteTextView = (AutoCompleteTextView) find......
autoCompleteTextView.setAdapter(mAdapter);
Behnam
  • 2,212
  • 2
  • 22
  • 32
  • thanks, but that's not it.. there's no difference between what i did, and what you're saying. – Vlad Mar 25 '12 at 16:30
  • yes. it did seem to make some change but it's still not working – Vlad Mar 25 '12 at 16:49
  • i found the problem, i had a null object in the list that screwed things up for some reason. thanks for the help! – Vlad Mar 25 '12 at 17:01