package ir.almahdi.sandogh_bsa_aza.Adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.RecyclerView.ViewHolder;

import java.util.List;

import ir.almahdi.sandogh_bsa_aza.Model.Model_user;

public class AdapterRecy extends RecyclerView.Adapter<AdapterRecy.viewHolder>
{

    Context mContext;
    List<Model_user> list;

    public AdapterRecy(Context mContext, List<Model_user> list)
    {
        this.mContext = mContext;
        this.list = list;
    }

    @NonNull
    @Override
    public viewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        return null;
    }

    @Override
    public void onBindViewHolder(@NonNull viewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 0;
    }

    public class viewHolder extends ViewHolder {
        public viewHolder(@NonNull View itemView) {
            super(itemView);
        }
    }

//    @NonNull
//    @Override
//    public viewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType)
//    {
//        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.activity_mainkarbar, parent, false);
//        return new viewHolder(view);
//    }

//    @Override
//    public void onBindViewHolder(@NonNull final viewHolder holder, int position)
//    {
//
//        final Model_user model = list.get(position);
//        GlideApp
//                .with(this.mContext)
//               .load(model.getUrl())
//                .skipMemoryCache(true)
//                .thumbnail(0.2f)
//                .error(R.drawable.network)
//                .placeholder(R.drawable.placeholder)
//                .transition(DrawableTransitionOptions.withCrossFade(800))
//                .into(holder.imageView);

//        holder.imageView.setOnClickListener(new View.OnClickListener()
//        {
//            @Override
//            public void onClick(View view)
//            {
//
//                Intent intent = new Intent(AdapterRecy.this.mContext, ImageFull_Activity.class);
//                ActivityOptionsCompat optionsCompat = ActivityOptionsCompat.makeSceneTransitionAnimation((Activity) AdapterRecy.this.mContext, holder.imageView, "image");
//                intent.putExtra("url", model.getUrl());
//                intent.putExtra("name", model.getName());
//                mContext.startActivity(intent, optionsCompat.toBundle());
//            }
//        });
//    }
//
//    @Override
//    public int getItemCount()
//    {
//        return list.size();
//    }

//    public class viewHolder extends RecyclerView.ViewHolder
//    {
//        ImageView imageView;
//
//        public viewHolder(@NonNull View itemView)
//        {
//            super(itemView);
//            imageView = (ImageView) itemView.findViewById(R.id.imageList);
//        }
//    }
}
