I'm trying to animate the way the expandable listView expands, but I can't find anything on the web on how to do that except for this: https://github.com/idunnololz/AnimatedExpandableListView/ and I'm not that professional so I can't understand how to implement it to my activity. Please if you know tell me how to add it my activity or another way to do so, thanks
Apply animation on OnGroupClickListener
. You could do something like -
listView.setOnGroupClickListener(new OnGroupClickListener() {
@Override
public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
if (listView.isGroupExpanded(groupPosition))
listView.collapseGroupWithAnimation(groupPosition);
else
listView.expandGroupWithAnimation(groupPosition);
return true;
}
});
Link to AnimatedExpandableListView
library.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With