title: Strange ListView selection behavior on Android
body: <p>Got an activity that extends <code>ListActivity</code>.
  The list is backed up by a custom adapter that extends <code>BaseAdapter</code>.</p>
  
  <pre><code>getListView().setFocusable(true);
  getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE);
  </code></pre>
  
  <p>I do a simple <code>(getSelectedItemPosition() == ListView.INVALID_POSITION)</code> check in <code>onPrepareOptionsMenu()</code> to disable the items that require an item to be selected.</p>
  
  <p>Now, what I do after launching the activity (the action takes place
  under emulator, ver.1.1) an what it looks like:</p>
  
  <ol>
  <li>Hit menu - the menu items are disabled - OK</li>
  <li>Select an item with mouse wheel and hit menu - the items get enabled
  -OK</li>
  <li>Click anywhere outside the list, repeat 2). The items don't get
  enabled - WTF?</li>
  <li>Start from scratch, select an item hitting Del and moving mouse. The
  result is the same as for 3.</li>
  </ol>
  
  <p>Why do these (3, 4) things keep happening to me? :)
  TIA. </p>