Hi all, I am having some problems using a spinner with a SimpleCursorAdapter. Basically, my activity ships a button to start a new activity that add new items to the table the spinner is linked to. Everything works beautifully, but the problems started when I wanted to set the spinner to the last created item. I thought that returing the rowid of the new item would have been ok, but the code
if(resultCode == Activity.RESULT_OK){ Long rowid = data.getLongExtra(mDbHelper.ST_ROW_ID, -1); if(rowid != -1){ mSpinner.setSelection(rowid.intValue()); } return; } has no effect on the spinner. I also tried to force manually to some value the argument of setSelection, with no results. Moreover, I am not sure setSelection would be the right method, since it accepts a position and not an id. Any hints? Thanks in advance and best regards, Federico --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---