In my expandableListView, I created a custom button for expanding / smoothing a group and expanding it, but not when resetting.
with this code
listView.setOnGroupClickListener(new OnGroupClickListener() { @Override public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) { Log.d("group click"); return true; } }); listView.setOnGroupCollapseListener(new OnGroupCollapseListener() { @Override public void onGroupCollapse(int groupPosition) { Log.d("group collapse"); } }); listView.setOnGroupExpandListener(new OnGroupExpandListener() { @Override public void onGroupExpand(int groupPosition) { Log.d("group expand"); } });
With this code: when the group crashed:
- button press = expand group
- click elsewhere in the group = do something
setOnGroupClickListener
when the group expands:
- button press = collapse group (ok, but ...)
- clicking elsewhere in the group = collapse of the group, not a reaction from
setOnGroupClickListener
Why does setOnGroupClickListener
not load when I click on an extended group? How to solve this?
source share