| | |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.ui.bean.HouseInfoBean; |
| | | import com.hdl.photovoltaic.ui.bean.HouseListBean; |
| | | |
| | | import java.util.List; |
| | | |
| | | public class HouseInfoAdapter extends RecyclerView.Adapter<HouseInfoAdapter.MyViewHolder> { |
| | | |
| | | private List<HouseInfoBean> mList; |
| | | private List<HouseListBean> mList; |
| | | |
| | | public HouseInfoAdapter(List<HouseInfoBean> list) { |
| | | public HouseInfoAdapter(List<HouseListBean> list) { |
| | | this.mList = list; |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public void onBindViewHolder(@NonNull MyViewHolder holder, int position) { |
| | | HouseInfoBean houseInfoBean = this.mList.get(position); |
| | | holder.homeNameTv.setText(houseInfoBean.getName()); |
| | | HouseListBean houseListBean = this.mList.get(position); |
| | | holder.homeNameTv.setText(houseListBean.getHomeName()); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public void setList(List<HouseInfoBean> list) { |
| | | public void setList(List<HouseListBean> list) { |
| | | this.mList = list; |
| | | } |
| | | |