package com.sheep.gamegroup.view.dialog;

import android.app.Activity;
import android.support.v7.app.AlertDialog;
import android.view.View;

import com.kfzs.duanduan.utils.dlg.ViewFindUtils;
import com.sheep.jiuyan.samllsheep.R;

public class DialogRealNameAuther {


    public static AlertDialog showDialog(final Activity activity) {
        View view = View.inflate(activity, R.layout.dialog_real_name_auther, null);
        final AlertDialog mAlertDialog = new AlertDialog.Builder(activity, R.style.MyDialogActivityTheme)
                .setView(view)
                .create();
        ViewFindUtils.find(view, R.id.dialog_sure)
                .setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        mAlertDialog.dismiss();
                    }
                });
        ViewFindUtils.find(view, R.id.dialog_close)
                .setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        mAlertDialog.dismiss();
                    }
                });
        try {
            mAlertDialog.show();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return mAlertDialog;
    }
}
