This is the tutorial I have used: http://www.tutorialsbuzz.com/2014/08/filter-custom-listviewbaseadapter.html
and I implemented to it an onItemClickListener
OnItemClickListener myListViewClicked = new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
String member_name = countrylist.get(position).getName();
// get Internet status
isInternetPresent = cd.isConnectingToInternet();
if (isInternetPresent) {
if (member_name.equals("aa")) {
Intent i = new Intent(Listview.this, Start.class);
startActivity(i);
displayInterstitial();
} else {
prName.show();
}
}
};
lv.setOnItemClickListener(myListViewClicked);
}
so, let us suppose my original list is
Aa
BB
Ca
DD
and I type 'a' in the filter, then the list becomes
Aa
Ca
But when I click Ca, I get redirected into BB using further action that depends on .equal for each list item.
My code for my list and custom adapter is the same as in the tutrial, but the onclickitem listener, i have implemeneted it, so I think im missing something in it. I tried searching and found couple of same quesiton, but none answered, each with self-answer that was different than mine and i couldn't apply it to my cusotm adapter.