绑定手机号点击"跳过"增加弹窗提示

This commit is contained in:
lyr
2020-08-21 18:24:33 +08:00
parent 36fd8cf408
commit e1bb02f4e0
6 changed files with 38 additions and 14 deletions

View File

@ -1531,12 +1531,22 @@ public class DialogUtils {
dialog.show();
}
public static void showSamePhoneDialog(Context context, @NonNull ConfirmListener listener) {
public static void showNoticeDialog(Context context, String title, String content, @NonNull ConfirmListener listener) {
context = checkDialogContext(context);
final Dialog dialog = new Dialog(context, R.style.DialogWindowTransparent);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_same_phone, null);
View contentView = LayoutInflater.from(context).inflate(R.layout.dialog_notice, null);
TextView titleTv = contentView.findViewById(R.id.dialog_title);
TextView contentTv = contentView.findViewById(R.id.dialog_content);
if (title == null) {
titleTv.setVisibility(View.GONE);
} else {
titleTv.setVisibility(View.VISIBLE);
titleTv.setText(title);
}
contentTv.setText(content);
contentView.findViewById(R.id.dialog_ok).setOnClickListener(v -> {
listener.onConfirm();