Android: ExpandableListView and context menus
<p>I'm writing an app utilizing <strong>ExpandableListView</strong>.<br>
I use a subclass of <strong>BaseExpandableListAdapter</strong> to provide data to my <strong>ExpandableListView</strong>.</p>

<p>Then I try to add context menus to this view, but these menus should be different for group an child items in the expandable list. So in my adapter's <strong>getChildView</strong> and <strong>getGroupView</strong> I call <strong>setOnCreateContextMenuListener</strong> like this:</p>

<pre><code>TextView textView = new TextView(TestActivity.this);;
textView.setText(getChild(groupPosition, childPosition).toString());      
textView.setOnCreateContextMenuListener(new View.OnCreateContextMenuListener() {
      @Override
      public void onCreateContextMenu(ContextMenu menu, View v,
                                      ContextMenu.ContextMenuInfo menuInfo) {
        TestActivity.this.onCreateChildContextMenu(menu, v, menuInfo);
      }
    });
return textView;
</code></pre>

<p><strong>TestActivity.this.onCreateChildContextMenu</strong> simply adds a few string to menu.</p>

<p>The problem:<br>
This works quite fine - context menu appears and works as expected but group item cannot be expanded anymore. It simply ignores short clicks. I've checked - as expected the textView becomes isLongClickable() after this line but it remains not isClickable() - so I cannot see how this context menu callback can affect short click functionality.<br>
I've solved this problem for me by adding this listener at the whole ExpandableListView and then patching the menu for children. But it looks ugly. Do I miss something?</p>

<p>Thanks.</p>
