Is it possible to call a method using Spinner
of android?
I need to select the option and based on this selected option I need to send request
to webservice
, and this will return me the other options of Spnnier
.
Is it possible to call a method using Spinner
of android?
I need to select the option and based on this selected option I need to send request
to webservice
, and this will return me the other options of Spnnier
.
Through setOnItemSelectedListener
:
spinner.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {
// SEU CÓDIGO
}
@Override
public void onNothingSelected(AdapterView<?> parentView) {
// SEU CÓDIGO
}
});