Hello all,
  I am trying to use ArrayAdapter to search from a list of values
stored in arrays.xml with AutoComplete feature.

I read the data from the arrays.xml but can not get it to
AutoComplete. I get the following error message:

"The constructor ArrayAdapter(new View.OnClickListener(){}, int, String
[]) is undefined"

Please let me know what is it that i am doing wrong.

here's the code:
--------------------------------------------------------------------------------

final Button buttons = (Button) findViewById(R.id.search);
        buttons.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Perform action on click Search
                astate=SEARCH_VIEW;
                setContentView(R.layout.search_layout);

                //Countries has a list of countries
                Resources res = getResources();
                Countries = res.getStringArray(R.array.countries);

                //Now try to search using AutoComplete()
                ArrayAdapter<String> adapter = new ArrayAdapter(this,
                        android.R.layout.simple_dropdown_item_1line,
Countries);
                AutoCompleteTextView textView = (AutoCompleteTextView)
findViewById(R.id.edit);
                textView.setAdapter(adapter);
                        }
        });

--------------------------------------------------------

any inputs and comments are appreciated.

Regards,
Phanikumar

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to