コード例 #1
0
  public void setProfesionesData(List<ProfesionVO> profesiones) {
    ArrayAdapter<ProfesionVO> dataAdapter =
        new ArrayAdapter<ProfesionVO>(
            getContext(), android.R.layout.simple_spinner_item, profesiones);
    dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spinList.setAdapter(dataAdapter);

    selectedProfesion = profesiones.get(0);
    dialogRefresh.refresh(sexo, edad, _fuma, selectedProfesion, fullName);
  }
コード例 #2
0
 @Override
 public void onBackPressed() {
   View dialogView = findViewById(R.id.dialogDatos);
   fullName = ((EditText) findViewById(R.id.textFullName)).getText().toString();
   if (validar()) {
     getValores();
     dialogRefresh.refresh(sexo, edad, _fuma, selectedProfesion, fullName);
     super.dismiss(dialogView);
   } else {
     Animation tween = AnimationUtils.loadAnimation(getContext(), R.anim.tilt);
     tween.reset();
     dialogView.clearAnimation();
     dialogView.startAnimation(tween);
   }
 }