I created a custom ListView
with ImageView
and TextViews
and every thing worked fine until i tried to implement onItemClick
, which for the time being only shows a Toast.
The problem occurs when i scroll down my ListView
: it won't receive any clicks.
Funny thing is that when i use the keyboard to move from item to item it works and when i hit enter the Toast
is shown
This is the code i used for onItemClick
listener.
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
RestaurantReservationBean clickedItem = resultArray.get(position);
Toast.makeText(this, clickedItem.getName()+", "+clickedItem.getCost(), 1000).show();
}