title: How to select an ListView item after long click?
body: <p>I've got a silly little problem. I've registered a <code>ListFragment</code> both as <code>OnItemClickListener</code> and <code>OnItemLongClickListener</code> of its own <code>ListView</code>.</p>
  
  <p>When the <code>onItemClick</code> event is called, an intent for the detail view activity of that item is started, no problems there.</p>
  
  <p>When the <code>onItemLongClick</code>event happens, I want to accomplish the following things:</p>
  
  <ul>
  <li>Create a CAB</li>
  <li>Keep the long-pressed item selected</li>
  </ul>
  
  <p>Code:</p>
  
  <pre><code>@Override
  public boolean onItemLongClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
      if(this.cabMode != null)
          return false;
      this.cabMode = getActivity().startActionMode(editModeCallback);
      view.setSelected(true);
      return true;
  }
  </code></pre>
  
  <p>The CAB will show, however, the selection won't stay with the item.</p>
  
  <p>Some bits and pieces, in case they are relevant: I've read about fixing this issue with calls to <code>view.requestFocusFromTouch()</code> or using <code>listView.setItemChecked()</code>, but that didn't work for me. Also, the views for the list items are instanced from a custom layout, but don't have any custom event listeners attached.</p>
  
  <p>Any help is appreciated. Thx!</p>