title: Android ExpandableListView group position always 0
body: <p>I have an ExpandableListView and I want to log the groupposition when clicking on a group. Unfortunately the code below returns always 0, as if I were clicking on the 0th group.</p>
  
  <pre><code>  exList.setOnGroupClickListener(new OnGroupClickListener() {
  
      @Override
      public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
            groupPosition = ExpandableListView.getPackedPositionGroup(id);
  
            Log.i("group position", groupPosition + "");
            return false;
      }
  
    });
  </code></pre>
  
  <p>I also have a longclicklistener on the groups and childs which works right:</p>
  
  <pre><code>exList.setOnItemLongClickListener(new OnItemLongClickListener() {
        @Override
        public boolean onItemLongClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
            if (ExpandableListView.getPackedPositionType(id) == ExpandableListView.PACKED_POSITION_TYPE_CHILD) {
                groupPosition = ExpandableListView.getPackedPositionGroup(id);
  ...
  }
  </code></pre>
  
  <p>Any ideas?</p>