I use AutoCompleteTextView
, when I enter a letter, it only tightens words that start with this letter, and how to make all the words that have this letter pull up? Any other AutoCompleteTextView
?
public class MainActivity extends Activity { String[] language ={"C","C++","Java",".net"," iphone","android","asp.net","php"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ArrayAdapter<String> adapter = new ArrayAdapter<String> (this,android.R.layout.select_dialog_item,language); AutoCompleteTextView actv= (AutoCompleteTextView)findViewById(R.id.autoCompleteTextView1); actv.setThreshold(1); actv.setAdapter(adapter); actv.setTextColor(Color.RED); } }
getFilter()
method of theArrayAdapter
so that it returns the necessary filter. How to - google.com.ua/… - Vladyslav Matviienko