package com.rehome.bhdxj.activity.sbxdj;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.ListView;
import com.rehome.bhdxj.DBModel.QYAQFXDATABean;
import com.rehome.bhdxj.R;
import com.rehome.bhdxj.adapter.GwfxListAdapter;
import com.rehome.bhdxj.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() {
        qyddataBeanArrayList = new ArrayList<>();
        requestDatas();
    }

    @Override
    public void initData() {

    }


    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) {

                }
            });
    }
}
