package com.bjzc.bhzhgd.activity.sbxdj;


import android.os.Bundle;
import android.widget.EditText;

import com.bjzc.bhzhgd.R;
import com.bjzc.bhzhgd.base.BaseFragment;


/**
 * 安健环巡查管理-标准
 */
public class BzFragment extends BaseFragment {

    EditText et_bz;

    private boolean isEdit;
    private String bz;

    public BzFragment() {
    }

    public static BzFragment newInstance(boolean b, String bz) {
        Bundle bundle = new Bundle();
        bundle.putBoolean("edit", b);
        bundle.putString("bz", bz);
        BzFragment fragment = new BzFragment();
        fragment.setArguments(bundle);
        return fragment;
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Bundle bundle = getArguments();
        if (bundle != null) {
            isEdit = bundle.getBoolean("edit");
            bz = bundle.getString("bz");
        }
    }

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

    @Override
    protected void initView() {
        et_bz = view.findViewById(R.id.et_bz);
        et_bz.setEnabled(isEdit);
        updata(bz);
    }

    @Override
    public void initData() {
        super.initData();
    }



    /**
     * 更新数据
     */
    public void updata(String bz) {
        et_bz.setText(bz);
    }
}
