package cn.dankal.basiclib.widget.dialog;

import android.content.Context;
import android.view.Gravity;
import android.view.View;

import cn.dankal.basiclib.R;


public class TipToLoginDialog extends BaseDialog {


    public TipToLoginDialog(Context context) {
        super(context);
    }

    @Override
    public void initDialog() {
        dialog = new CustomDialog.Builder(context).widthdp(280).gravity(Gravity.CENTER).view(R.layout.dialog_tip_login).build();
        dialog.addViewOnclick(R.id.dismiss, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
            }
        });

        dialog.addViewOnclick(R.id.deter, new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                dismiss();
                goLogin();
            }
        });

        dialog.setTextColor(R.id.deter, context.getResources().getColor(R.color.title_bar_color_orange));

        dialog.setText(R.id.tv_tips, "您还未登录，是否登录？");

        dialog.setText(R.id.dismiss, R.string.cancel);
    }


    public void goLogin() {
//        ARouter.getInstance().build(UserProtocol.ACTIVITY_LOGIN).withInt("type",1).navigation();
    }
}
