当我单击“下一步”时,我想将电话号码从 editText 放入自定义警报对话框,如下所示:
我已将 getStringExtra 放入 textView 自定义对话框,但我应该单击“是”,然后显示号码成功。但我想要的是当我单击“下一步”时,显示数字。
代码 :
public void sendVerificationCode() {
phoneNumber = countryCode.getFullNumberWithPlus(); // The number i want to display to custom alert dialog
Intent moveVerification = new Intent(CreateUserActivity.this, VerificationCode.class);
moveVerification.putExtra("sendPhoneNumber", phoneNumber);
startActivity(moveVerification);
finish();
}
public void dialogVerification() {
dialogVerification = new Dialog(CreateUserActivity.this);
dialogVerification.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialogVerification.setContentView(R.layout.custom_alert_dialog);
dialogVerification.setCanceledOnTouchOutside(false);
Button buttonYes = dialogVerification.findViewById(R.id.buttonYes);
Button buttonEdit = dialogVerification.findViewById(R.id.buttonEdit);
TextView displayNumber = dialogVerification.findViewById(R.id.displayNumber); // I want to display the number at here
dialogVerification.getWindow().setLayout(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
dialogVerification.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));
dialogVerification.show();
}
慕无忌1623718
杨__羊羊
慕盖茨4494581
斯蒂芬大帝
相关分类