this is my code in which the app is running just fine but the dialog box is not opening the button is clickable but no action is being performed
@Override
public void onClick(View view){
AlertDialog.Builder mBuilder = new AlertDialog.Builder(appointmentpage.this);
View mView = getLayoutInflater().inflate(R.layout.dialog_otp,null);
final EditText mOTP = (EditText) mView.findViewById(R.id.enterOTP);
final Button mVerify = (Button) mView.findViewById(R.id.verify);
mVerify.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(mOTP.getText().toString().isEmpty())
{
mVerify.setOnClickListener(new View.OnClickListener(){
@Override
public void onClick(View view) {
AlertDialog.Builder mBuilder1 = new AlertDialog.Builder(appointmentpage.this);
View mView1 = getLayoutInflater().inflate(R.layout.confirmation_final,null);
}
});
}
else{
Toast.makeText(appointmentpage.this,
"Enter OTP",
Toast.LENGTH_SHORT).show();
}
}
No comments:
Post a Comment