Open txhuy opened 9 years ago
Add code card.doToogleExpand();
I've also encountered this issue. The same bug applies to the collapse-start listener. The fix is very simple, though: getting the ExpandCollapseHelper class to register a listener over the expand-animation that also overrides the onAnimationStart() method. In that method, the user's listener should be invoked. For example:
class ExpandCollapseHelper {
// ...
private static void animateExpanding(final ExpandContainerHelper helper) {
// ...
// ...
helper.getCardView().getExpandAnimator().addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationStart(Animator animation) {
if (helper.card.getOnExpandAnimatorStartListener() != null)
helper.card.getOnExpandAnimatorStartListener().onExpandStart(helper.card);
}
@Override
public void onAnimationEnd(Animator animation) {
// ...
}
// ...
I have problem with card.setOnExpandAnimatorStartListener.