Onclicklistner on recycler view to go in next activity
package com.codewithmadde.foodyhut.Adapters ; import android.content.Context ; import android.content.Intent ; import android.view.LayoutInflater ; import android.view.View ; import android.view.ViewGroup ; import android.widget.ImageView ; import android.widget.TextView ; import androidx.annotation. NonNull ; import androidx.recyclerview.widget.RecyclerView ; import com.codewithmadde.foodyhut.DetailActivity ; import com.codewithmadde.foodyhut.Models.MainModel ; import com.codewithmadde.foodyhut.R ; import java.util.ArrayList ; public class MainAdapter extends RecyclerView.Adapter<MainAdapter.viewholder> { ArrayList<MainModel> list ; Context context ; public MainAdapter (ArrayList<MainModel> list , Context context) { this . list = list ; this . context = context ; } @NonNull @Override public viewholder onCreateViewHolder ( @NonNull ViewGroup parent , int viewType) { View view= LayoutInflater. from ( context ).infla