This is in reference to video lecture 45-48 on ListView.

Error:(25, 23) error: no suitable method found for setOnClickListener()
method View.setOnClickListener(OnClickListener) is not applicable
(argument mismatch; cannot be converted to OnClickListener)
method AdapterView.setOnClickListener(OnClickListener) is not applicable
(argument mismatch; cannot be converted to OnClickListener)

this is the error I got

and.. this is what I have written:

buckysListView.setOnClickListener(
new AdapterView.OnItemClickListener(){
@Override
public void onItemClick(AdapterView parent, View view, int position, long id) {
String food = String.valueOf(parent.getItemAtPosition(position));
Toast.makeText(MainActivity.this, food, Toast.LENGTH_LONG).show();

}
}
);