package com.bjzc.bhzhgd.activity.sbxdj;


import android.os.Bundle;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.bjzc.bhzhgd.DBModel.QYAQFXDATABean;
import com.bjzc.bhzhgd.R;
import com.bjzc.bhzhgd.adapter.GwfxListAdapter;
import com.bjzc.bhzhgd.base.BaseFragment;
import java.util.ArrayList;

public class FXFragment extends BaseFragment {


    ListView lv;
    private ArrayList<QYAQFXDATABean> qyddataBeanArrayList;
    GwfxListAdapter gwfxlistadapter;

    @Override
    public int getContentViewId() {
        return R.layout.fragment_fx;
    }

    @Override
    protected void initView() {
        lv = view.findViewById(R.id.lv);

        qyddataBeanArrayList = new ArrayList<>();
        requestDatas();
    }

    private void requestDatas() {
        Bundle bundle = getActivity().getIntent().getExtras();
        qyddataBeanArrayList = bundle.getParcelableArrayList("QYFXTS");
        setAdapter();
    }

    private void setAdapter() {
        gwfxlistadapter = new GwfxListAdapter(context, qyddataBeanArrayList);
        lv.setAdapter(gwfxlistadapter);
        lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {


            }
        });


    }

}
