package com.ycgis.macall.personalcenter.v.adapter;

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

import androidx.annotation.NonNull;

import com.rs.macall.androidx.basemodel.base.BaseRecyclerAdapter;
import com.ycgis.macall.personalcenter.R;

import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * created by:   Macall
 * create time:  2023/10/26 14:34
 * copyright:    @ruansee.com
 * Describe:
 */
public class SimStringListAdapter extends BaseRecyclerAdapter<String,BaseRecyclerAdapter.SimpleViewHolder> {

    public SimStringListAdapter(Context context, List<String> dataList) {
        super(context, dataList);
    }

    @NonNull
    @NotNull
    @Override
    public BaseRecyclerAdapter.SimpleViewHolder onCreateViewHolder(@NonNull @NotNull ViewGroup parent, int viewType) {
        View view = bindView(parent, R.layout.item_sim_string);
        return new SimpleViewHolder(view).findViewById(R.id.tv_sim_string_msg);
    }

    @Override
    public void onBindViewHolder(@NonNull @NotNull BaseRecyclerAdapter.SimpleViewHolder holder, int position) {
        TextView view = (TextView) holder.getView(R.id.tv_sim_string_msg, TextView.class);
        view.setText(dataList.get(position));
    }
}
