package com.philisense.rdgo.adapter;

import android.databinding.DataBindingUtil;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.philisense.rdgo.R;
import com.philisense.rdgo.databinding.ItemMainBinding;


/**
 * Created by shaop on 2017/12/7.
 */

public class MainAdapter extends RecyclerView.Adapter{
    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        ItemMainBinding mBindHeader = DataBindingUtil.inflate(LayoutInflater.from(parent.getContext()), R.layout.item_main, parent, false);
        return new MainViewHolder(mBindHeader.getRoot());
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

    }

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

    private class MainViewHolder extends RecyclerView.ViewHolder {

        ItemMainBinding itemMainBinding;

        MainViewHolder(View view) {
            super(view);
            itemMainBinding = DataBindingUtil.getBinding(view);
        }
    }
}
