Hi, I have following two arrays and I want to bind them to a AutoCompleteTextView. My problem is when type on the textview it filters the nameArr and I lost the correct index in the idArr. How do I bind idArr to the view?
String idArr[] = new String[]{"1","2","3"}; String nameArr[] = new String[]{"a","b","c"}; autoCompleteAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line); autoCompleteAdapter.setNotifyOnChange(true); autoComplete = (AutoCompleteTextView)findViewById(R.id.practice_search_text_edit); autoComplete.setAdapter(autoCompleteAdapter); for (int i = 0; i < nameArr.length; i++) { autoCompleteAdapter.add(nameArr[i]); } Thanks. -Shamim -- 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