Code example for Spinner

Methods: getSelectedItemId

0
 
	public void btnRegistrarTaxi_Click(View view) {
		boolean ok = true;
		try { 
			int idReserva = dbHelper.GetReservaID();
			int idTaxi = Integer.valueOf((int) spinTaxi.getSelectedItemId());
			dbHelper.updReservaTaxiID(idReserva, idTaxi);
		} catch (Exception ex) {
			ok = false;
			CatchError(ex.toString());
		} finally { 
			if (ok) {
				// NotifyEmpAdded(); 
				Alerts.ShowRegistrarTaxiAlert(this);
				Intent i = new Intent(this, Opciones.class);
				startActivity(i);
				// txtEmps.setText("Numero de Reservas: "+String.valueOf(dbHelper.getReservaCount())); 
			} 
		} 
	} 
Stop searching for code, let great code find you!  Add Codota to your java IDE