Code example for ToggleButton

Methods: getText

0
				if(payment.getSelectedItem().toString().equals("Dinheiro")){ data.add("0"); }
				else { data.add("1"); }
				if(animals.getText().toString().equals("Sim")){ data.add("1"); }
				else { data.add("0"); }
				data.add(passengers.getSelectedItem().toString());
				if(needs.getText().toString().equals("Sim")){ data.add("1"); }
				else { data.add("0"); }
				if(volume.getText().toString().equals("")) { data.add("0"); }
				else { data.add(volume.getText().toString()); }
 
				RequestTaxi request = new RequestTaxi();
				request.execute(taxiId);
			} 
		}); 
	} 
		 
    private class RequestTaxi extends AsyncTask<String, String, String> {
    	 
        @Override 
        protected void onPreExecute() { 
        	progressDialog = ProgressDialog.show(RequestFilterActivity.this, RequestFilterActivity.this.getString(R.string.pd_title),