Received an action that extends ListActivity. The list is backed up by a custom adapter that extends BaseAdapter.
getListView().setFocusable(true);
getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
I am doing a simple check (getSelectedItemPosition() == ListView.INVALID_POSITION)in onPrepareOptionsMenu()to disable items for which you want to select an item.
Now, what I do after starting the activity (the action takes place under the emulator, ver.1.1), what it looks like:
- Menu hit - menu items are disabled - OK
- Select an item with the mouse wheel and click on the menu - the elements are activated -Good
- Click anywhere outside the list, repeat 2). Items don't get enabled - WTF?
- Start from scratch, select the element hitting Del and moving the mouse. the result is the same as for 3.
Why do these (3, 4) things continue to happen to me? :) TIA.
source
share