0

is possible to create EditText that when i start entering letters will give suggestions for words that are on the database?

and if yes who can i make something like that?

Galion
  • 33
  • 1
  • 10

1 Answers1

1

Yes, you should use AutoCompleteTextView instead of EditText. Then, you need to set the adapter for the AutoCompleteTextView, which is the words that are on your database.

AutoCompleteTextView ac = (AutoCompleteTextView) findViewById(R.id.yourAutoCompleteTextView);
ac.setAdapter(new ArrayAdapter<String>(Activity.this, android.R.layout.simple_dropdown_item_1line, youArrayFromDatabase));

Hope it helps!

Giacomoni
  • 1,468
  • 13
  • 18