Issue
My codes
My adapter
public class MyAdapter extends RecyclerView.Adapter<MyAdapter.myviewholder>
{
List<ResponseModel> data;
private final IOtobusSaatleriInterface iOtobusSaatleriInterface;
public MyAdapter(List<ResponseModel> data, IOtobusSaatleriInterface iOtobusSaatleriInterface) {
this.data = data;
this.iOtobusSaatleriInterface = iOtobusSaatleriInterface;
}
And my interface
public interface IOtobusSaatleriInterface {
void onItemClick(int position);
}
This is my fail and my fail home fragment page. where is the my fail ?
Solution
Instead of this, write something like HomeFragment.this.
I assume that HomeFragment implements IOtobusSaatleriInterface.
Answered By - VJe
Answer Checked By - Mildred Charles (JavaFixing Admin)