Answers for "which function of Autocompletetextview control is used to suggest items when the user starts typing in the text box"

3

autocompletetextview in android studio

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

         ArrayAdapter<String> adapter = new ArrayAdapter<String>(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"
     };
 }
Posted by: Guest on October-24-2020

Code answers related to "which function of Autocompletetextview control is used to suggest items when the user starts typing in the text box"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language