package com.example.administrator.zhapp.activity.ajhxcgl;

import android.content.Intent;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import com.example.administrator.zhapp.R;
import com.example.administrator.zhapp.activity.BaseActivity;
import com.example.administrator.zhapp.adapter.SbdjAdapter;
import com.example.administrator.zhapp.entity.SbdjInfo;
import java.util.ArrayList;
import java.util.List;


/**
 * 安健环巡查管理-隐患排查管理
 */
public class AyhpcglActivity extends BaseActivity {

    ListView lv;
    private SbdjAdapter adapter;
    private List<SbdjInfo> list;

    @Override
    public int getContentViewID() {
        return R.layout.activity_ayhpcgl;
    }

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

    @Override
    public void initData() {

        setTitle("隐患排查管理");
        setBack();

        list = new ArrayList<>();
        SbdjInfo info = new SbdjInfo();
        info.setJcnr("隐患排查任务");
        list.add(info);
        adapter = new SbdjAdapter(this, list);
        lv.setAdapter(adapter);
        lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
                Intent intent = new Intent(AyhpcglActivity.this, AyhpcglDetaliActivity.class);
                startActivity(intent);
            }
        });
    }
}
