spCountries.setOnItemSelectedListener(new OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> adapter, View v,
int position, long id) {
switch (position)
{
case 0:
startActivity(new Intent(NagpurSem.this, ComputerWorkshop.class));
}
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
});
I want it to wait until the user will select something from the spinner, but instead, it directly goes to the third activity. Please help me.