Android-SlideExpandableListView
Android-SlideExpandableListView copied to clipboard
ExpandCollapseAnimation should be using ObjectAnimator.ofFloat
It seems that the ExpandCollapseAnimation is performing iterative calculations on the bottom margin each time it animates, which makes the animation of the expandable layout jittery. Please use ObjectAnimator.ofFloat instead so that the animation will be smooth. Thanks.
I agree. However ObjectAnimator are only available since API level 11. (Android 3.0.x).
That would require any app which uses this library to only run on Android 3.0 or higher. Since I want this library to be compatible with almost any android version, i am not going to include ObjectAnimator.
I could rewrite the animation in such a way that it would use ObjectAnimator if available, but that would complicate the code. And I dont see a lot of jittering.
Agreed?
I believe NineOldAndroids can backport ObjectAnimator if compatibility is an issue.
Hmm good point. However that does add an extra dependency for this project. Since this project is a relatively small one, i want to keep things simple.
B.t.w is the animation really slow for you?
2013/1/11 SeanPONeil [email protected]
I believe NineOldAndroids https://github.com/JakeWharton/NineOldAndroidscan backport ObjectAnimator if compatibility is an issue.
— Reply to this email directly or view it on GitHubhttps://github.com/tjerkw/Android-SlideExpandableListView/issues/5#issuecomment-12166538.
Tjerk Wolterink http://about.me/tjerkw
It eventually does after using it for a long time. How about using Translate animation on older versions?
I tried using an TranslateAnimation, but that doesnt work since a .requestLayout is required an every animation frame. This is probably also the reason that the animation is a bit jittery.
However I dont think the ObjectAnimator will solve that problem. Does the ObjectAnimator perform a requestLayout on every frame?
@peterbetos @SeanPONeil I tried using TranslateAnimation and tried with ObjectAnimator but I coudnt get it to work properly. Since this is not a failure but an improvement I will not focus too much on this item.
However you are free to submit pull requests ;-)
I'll check on my end as well how I can have it implemented.
I did see the animations becoming slow, and also scrolling becoming slow. But this is do to the fact sometimes a lot of new objects are created when scrolling. I'm going to focus on that.
Which makes this ticket related to issue #12