You can do something like this:
MyOnItemSelectedListener myonitemselectedlistener =new MyOnItemSelectedListener (savedRoomNames);
YOURSPINNER.setOnItemSelectedListener(myonitemselectedlistener);
And then:
private class MyOnItemSelectedListener implements OnItemSelectedListener{
AdapterView<?> arg0;
View arg1;
int arg2;
long arg3;
public MyOnItemSelectedListener(String[] gespeicherteRaeume) {
this.savedRooms=gespeicherteRaeume;
}
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,
long arg3) {
this.arg0=arg0;
this.arg1=arg1;
this.arg2=arg2;
this.arg3=arg3;
//here you have to look which item is arg2 and then if == yyour item start your new activity via intent
}
public void onNothingSelected(AdapterView<?> arg0) {
}