I have a ListActivity backed by an Adapter, which is NOT a SimpleCursorAdapter, but an extension of BaseAdapter. I create my own view in the adapter's GetView() method, which builds up a list on-the- fly.
Now I have a menu structure when this list is in focus. This menu structure contains a submenu, too, and I have noticed that the ListActivity's getSelectedItemPosition() returns -1 when I reach this submenu. I also noticed that this value is correct when I activate the top-level menu item that eventually "opens" the submenu (I queried the afore-mentioned function in onMenuItemSelected() and it was fine). But when onMenuItemSelected() gets called after the activation of a sub- menu item getSelectedItemPosition() always returns -1. Can anyone point out if my expectation is wrong to assume that a list selection shall not change when it's behind other UI components? Is it a bug in the system? How shall I overcome it? I could implement dirty tricks such as saving the position temporarily for a later query, but I'd like to know first if I'm doing something wrong and/or if it's a system malfunction. Thanks for your help in advance, Tote --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

