Hi, I have the following code but it doesn't work and it doesn't throw me any error, could you guide me? If anyone has encountered this problem. Thank you so much
ListView mContactsList = (ListView) view.findViewById(R.id.listagenda);
mContactsList.setAdapter(mAdapter);
mContactsList.setTextFilterEnabled(true);
mContactsList.setFastScrollEnabled(true);
numpad.addTextChangedListener(new TextWatcher() {
public void onTextChanged(CharSequence arg0, int arg1, int arg2,
int arg3) {
String text = numpad.getText().toString();
Toast.makeText(getContext(),text,Toast.LENGTH_LONG).show();
ContactsListActivity.this.mAdapter.getFilter().filter(text);
}
public void beforeTextChanged(CharSequence arg0, int arg1,
int arg2, int arg3) {
}
public void afterTextChanged(Editable arg0) {
ListView av = (ListView) view.findViewById(R.id.listagenda);
SimpleCursorAdapter filterAdapter = (SimpleCursorAdapter)av.getAdapter();
filterAdapter.getFilter().filter(arg0.toString());
}
});
I found the solution: