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

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

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

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {
        list = new ArrayList<>();
        for (int i=0;i<8;i++){
            list.add(new TablePBean(i,i+4,"aaa4"+i,"24"+i,"334"+i,"5554"+i));
        }

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

    }

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

    }
}
