I have a long list of data mapping in android spinner. So, I want to add a search parameter to this counter? Can someone help me with a simple code example .. (I saw some answers regarding this, but they are not enough).
I am new to android and I know that it is not. but I want to add this option to the counter. When you click a letter in the search box, the list of items is displayed in the line corresponding to this letter. Many thanks.
public void search (View View) {
cursor = db.rawQuery("SELECT * FROM tblRepTeritories WHERE RepCode like?", new String[]{"%" + searchText.getText().toString() + "%"}); SimpleCursorAdapter adapter1 = new SimpleCursorAdapter( this, android.R.layout.simple_spinner_item, cursor, new String[] {"TeriCode"}, new int[] {android.R.id.text1}); adapter1.setDropDownViewResource( android.R.layout.simple_spinner_dropdown_item );
source share