考虑到以下条件,当您单击“boton_continuar”按钮时,我试图显示祝酒词:EditExt Vacuum (numero_celular) 和 ckeckbox (check) 检查否。这是我的代码
boton_continuar.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
//Verificamos que se halla clikeado y se halla ingresado
if(check.isChecked() && numero_celular.getText().length() != 0){
Intent intent = new Intent(RegisterActivity.this, PrincipalActivity.class);
startActivity(intent);
}else{
Context contexto = getApplicationContext();
if(!check.isChecked()){
Toast.makeText(contexto, "Debe aceptar los términos", 2000);
}
if(numero_celular.getText().length() == 0){
Toast.makeText(contexto, "Debe ingresar su número", 2000);
}
}
}});