I have a problem. I have a String array with a SlowAdapter in a
ListActivity.
setListAdapter(new SlowAdapter(this));
getListView().setOnScrollListener(this);
And an EditText with a TextChangeListener:
dSelect.addTextChangedListener
(
new TextWatcher(){
public void afterTextChanged(Editable s){
}
public void beforeTextChanged(CharSequence s, int start, int
count, int after){
}
public void onTextChanged(CharSequence s, int start, int
before,
int count){
dStatus.setText(s.toString() + " letter writen.");
if (!s.toString().equals("")) {
for (int i = 0; i < mStrings.length; i++) {
if (mStrings[i].substring(0,
1).equalsIgnoreCase(s.toString
().substring(0, 1))) {
dStatus.setText(mStrings[i]);
break;
}
}
}
}
}
);
This code works perfect, when I write something in the EditText the
corresponding value of the String array appear in the dStatus
TextView. But I want to jump in the same time to the corresponding
list item and it is should be the fist elem in the list on the screen.
I have also implemented an OnScrollListener for the ListView, so that
is work, I can scroll the list, but I can not jump to a specific list
element .
Thanks in advance for your help.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en