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

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 ShouguangxFragment extends BaseFragment {
    @BindView(R.id.lv_shouguangxi)
    ListView lv_shouguangxi;

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

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {
        list = new ArrayList<>();
        for (int i=0;i<8;i++){
            list.add(new TablePBean(i,i+6,"aaa6"+i,"226"+i,"336"+i,"5556"+i));
        }

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

    }

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

    }
}
