Hi every one,

I got the solution. Here it is:

public class CountriesActivity extends Activity {
     protected void onCreate(Bundle icicle) {
         super.onCreate(icicle);
         setContentView(R.layout.countries);

         ArrayAdapter adapter = new ArrayAdapter(this,
                 android.R.layout.simple_dropdown_item_1line,
COUNTRIES);
         AutoCompleteTextView textView = (AutoCompleteTextView)
                 findViewById(R.id.countries_list);
         textView.setAdapter(adapter);
     }

     private static final String[] COUNTRIES = new String[] {
         "Belgium", "France", "Italy", "Germany", "Spain"
     };
 }

Thanks,
Manoj

On Feb 24, 4:05 pm, manoj <manojkumar.m...@gmail.com> wrote:
> Hi friends,
>
> I would like to enable search functionality to EditText.
>
> my requirement is like this:
> when some one types with some letter, suppose the user types 'a', then
> it should show all the words which starts with 'a' should be shown as
> a drop down list.
>
> For example, if I first typed "copy" in the EditText, if again, I
> cleared the EditText and tried to type "co", then it should show the
> drop-down list "copy","come","cow"....
>
> I want to enable this feature to my EditText view.
>
> Can any one please suggest me how to do this?
>
> Thanks,
> Manoj.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to