When the viewer selects an item from the spinner it should start a new intent.
BUT the app automaticly goes to the intent without waiting for the select. I thought the onNothingSelected was supposed to hold the app on the current activity until the user makes a selection. How do I fix this issue?
areaspinner.setOnItemSelectedListener(new OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> arg0, View arg1,
int arg2, long arg3) {
int item = areaspinner.getSelectedItemPosition();
Bundle bundle = new Bundle();
bundle.putInt("selection", item);
Intent myIntent = new Intent(patriosar.this, ShowXMLPAR.class);
myIntent.putExtras(bundle);
startActivityForResult(myIntent, 0);
}
public void onNothingSelected(AdapterView<?> parent) {
}
Try doing this
Your select listener is getting fired when you set the values. This will prevent that from happening