0

I would like to set an AutoCompleteTextView with a string array, which array data comes from MySQL database with use of AsyncTask. After that JSON formatted data is parsed into string array, which name is strArrData. Source strings are stored in a string array. I use code below to set adapter.

    myAutoComplete = (AutoCompleteTextView)rootView.findViewById(R.id.autoCompleteTextView1);

    ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),android.R.layout.simple_dropdown_item_1line,strArrData);

    myAutoComplete.setThreshold(2);
    myAutoComplete.setAdapter(adapter);

    new AsyncFetch().execute();

I got no error message, but when I tried to type first two characters a new interfaces opened with a submit button. I cannot get suggestions as automatic completion.

appkovacs
  • 97
  • 1
  • 1
  • 9

0 Answers0