View.performClick not triggered
<p>I have the following code in an adapter to handle clicks on a CheckBox. <code>gview</code> references the View argument in the adapter's <code>getView()</code></p>

<p>Adapter code:</p>

<pre><code>        selected.setOnCheckedChangeListener(new OnCheckedChangeListener() {

        @Override
        public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
            if (isChecked)
                if (selection.size() == 0)
                    gview.performLongClick();
                else
                    gview.performClick();
            else
                if (selection.size() == 1)
                    gview.performLongClick();
                else
                    gview.performClick();
        }

    });
</code></pre>

<p>The logic is in the activity containing the <code>ListView</code> where <code>performLongClick()</code> triggers <code>OnItemLongClick</code> and <code>performClick()</code> <strong>should</strong> trigger <code>onItemClick()</code> <strong>but my problem is that it doesn't</strong>:</p>

<p>Activity code:</p>

<pre><code>    @Override
    public void onItemClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2, long itemId) {
    if (listMode == MODE_NAVIGATION){
        home.browserFragment.loadUrl(bookmarks.findById((int)itemId).getUrl());
        home.browserFragment.closeBookmarks();
    } else{
        updateMultipleItemsSelection((int)itemId);

    }
}

  @Override
   public boolean onItemLongClick(AdapterView&lt;?&gt; arg0, View arg1, int arg2, long itemId) {
    if (listMode == MODE_SELECTION){
        deactivateSelectionMode();
    }else{
        activateSelectionMode();
        updateMultipleItemsSelection((int)itemId);
    }
    return true;
}
</code></pre>

<p>Does anyone see a possible solution to that problem?</p>

<p>Thanks    </p>
