package com.example.iot_controlhost.adapter;

import com.example.iot_controlhost.base.BaseRecyclerAdapter;
import com.example.iot_controlhost.databinding.ItemSensorInfoBinding;
import com.example.iot_controlhost.model.sensor.SensorInfo;
import java.util.List;

/**
 * 传感器信息适配器
 */
public class SensorInfoAdapter extends BaseRecyclerAdapter<SensorInfo, ItemSensorInfoBinding> {

    public SensorInfoAdapter(List<SensorInfo> dataList, Class<ItemSensorInfoBinding> bindingClass) {
        super(dataList, bindingClass);
    }

    @Override
    protected void bindData(ItemSensorInfoBinding binding, SensorInfo data) {
        binding.tvSensorName.setText(data.getName());
        binding.tvSensorInfo.setText(data.getInfo());
    }
}
