package com.bjzc.bhzhgd.activity;


import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.widget.TextView;
import com.bjzc.bhzhgd.R;

public class MemberCallbackDialogActivity extends Activity {
    private TextView title;
    private TextView tv_msg;
    private TextView tv_time;
    private TextView btnClose;

    private String userId;
    private String msgShowContent;
    private String time;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //必须在调用setContentView()之前调用requestWindowFeature()
        //requestWindowFeature(Window.FEATURE_LEFT_ICON);//要标题栏显示图标
        //全屏操作,一定要放在加载根view之前
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        getWindow().getDecorView().setBackgroundColor(Color.TRANSPARENT);
        setContentView(R.layout.dialog_member_callback_activity);
        initView();
        initData();
    }

    private  void initView(){
        title = findViewById(R.id.tv_title);
        tv_msg = findViewById(R.id.tv_msg);
        tv_time = findViewById(R.id.tv_time);
        btnClose = findViewById(R.id.dialog_commit);
        btnClose.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }
    private void initData() {
        Intent intent = getIntent();
        userId = intent.getStringExtra("userId");
        msgShowContent = intent.getStringExtra("msg");
        time = intent.getStringExtra("time");
        title.setText("紧急召回");
        if(msgShowContent!=null){
            tv_msg.setText(msgShowContent);
        }
        if(time!=null){
            tv_time.setText(time);
        }
    }


    @Override
    protected void onPause() {
        super.onPause();
    }

    @Override
    protected void onResume() {
        super.onResume();
    }
    @Override
    public void onDestroy() {
        super.onDestroy();
    }
}
