【发布时间】:2014-01-24 11:02:57
【问题描述】:
在以下条件下,当您单击“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);
}
}
}});
【问题讨论】:
标签: android android-edittext android-button android-toast