package com.sunzee.ui.dialog;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.widget.TextView;

import com.sunzee.R;


/**
 * 通用 dialog
 */
public class ResultDialog extends Dialog {

    TextView tvResult;

    public ResultDialog(@NonNull Context context, Activity activity) {
        super(context, R.style.DialogBgD);//加载样式
        setContentView(R.layout.dialog_normal);
        initView();
    }

    protected void initView() {
        tvResult = findViewById(R.id.tv_result);
    }

    public void onViewClicked() {
        dismiss();
    }

    /**
     * 设置结果
     */
    public void setResult(String result) {
        tvResult.setText(result);
    }
}
