Having an odd issue here and don't know why it doesn't work, I'm not that used to java yet.
to determine the selected item what needs to be done?
the spinner has 8 items and 'position' never = 1, or any other number.
onItemSelected()
is definitely getting fired so is the if statement wrong?
public void onItemSelected(AdapterView parent, View v,int position, long id) {
if (position == 1) //do something
}
EDIT: thanks Lion it turns out position doesnt seem to do anything. however, this works.
String s = parent.getSelectedItem().toString();
if (s == "1")//do something