Hi all
  I am a beginner trying to display a list of strings from arrays.xml using
AutoCompleteView when a button is pressed. But some how i end up getting
error code:
"The constructor ArrayAdapter(new View.OnClickListener(){}, int, String[])
is undefined" .

the following is the code that i am using.

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

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);

                Resources res = getResources();
                setCountries(res.getStringArray(R.array.countries));

                ArrayAdapter<String> adapter = new ArrayAdapter(this,
                        android.R.layout.simple_dropdown_item_1line,
Countries);
                AutoCompleteTextView textView = (AutoCompleteTextView)
findViewById(R.id.edit);
                textView.setAdapter(adapter);
            }
        });
--------------------------------------------------------------

please let me know what is going wrong and any help/comments would be
appreciated.

-- 

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