Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no expand animation when clicked on the last item on KitKat #34

Open
dzolnai opened this issue Jan 12, 2015 · 7 comments
Open

Comments

@dzolnai
Copy link

dzolnai commented Jan 12, 2015

When expanding the last group on Android 4.4, there is no expand animation, the group is opened instantly. The collapse animation for the same group works fine.
Possibly on Ice Cream Sandwich too, because removing the following lines from the expandGroupWithAnimation(int groupPos) method in AnimatedListViewExample.java makes it work again:

boolean lastGroup = groupPos == adapter.getGroupCount() - 1;
if (lastGroup && Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    return expandGroup(groupPos, true);
}
@kiwiandroiddev
Copy link

+1 to this. Why is the expand animation disabled for 14+, did it cause problems in a specific android version?

@lh-dasherz
Copy link

+1, I want to know why you disabled the animation of last group.

@nomyzs
Copy link

nomyzs commented Mar 4, 2015

eae7132

This commit message makes me think it's a simple mistake and condition should be other way around.

@doc-rj
Copy link

doc-rj commented Apr 10, 2015

@nomyzs
Seems you are right. Testing on Lollipop, I changed to this condition at the beginning of expandGroupWithAnimation():

if (lastGroup && Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
    return expandGroup(groupPos, true);
}

@wangyeming
Copy link

+1
I shield these codes and everything is OK. I have tested in android 2.3, android 4.4 and android 5.1.

@hoang-phan
Copy link

+1, I am testing in my tablet ME173X (JellyBean) and seems that the animation works for API level 17 too.

@Rendellhb
Copy link

When you include a footer view. The last group stop responding to listener. You click and nothing happens. Lollipop version works fine but in Jelly Beans it doesn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants