package com.qhclh.ytzh.work.tablepoultry.qiuping;

import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;

import com.qhclh.ytzh.R;
import com.qhclh.ytzh.base.BaseFragment;
import com.qhclh.ytzh.bean.TablePBean;
import com.qhclh.ytzh.work.tablepoultry.XFactryAdapter;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

/**
 * Created by 青花瓷 on 2017/12/4.
 */

public class QiupingFragment extends BaseFragment {
    @BindView(R.id.lv_qiuping)
    ListView lv_qiuping;

    private List<TablePBean> list;
    private XFactryAdapter adapter;
    @Override
    protected int setLayout() {
        return R.layout.fragment_qiuping;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {
        list = new ArrayList<>();
        for (int i=0;i<8;i++){
            list.add(new TablePBean(i,i+12,"aaaa2"+i,"222"+i,"3332"+i,"55552"+i));
        }

        adapter = new XFactryAdapter(getActivity(),list);
        lv_qiuping.setAdapter(adapter);

    }

    @Override
    protected void initOper() {
        lv_qiuping.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
            }
        });

    }
}
