So I'm trying to do some animations in my app and had a way to do it without using ObjectAnimator
and AnimatorListener
from API 11
. However, they're not as smooth and robust as just doing animations using those classes.
So I made the changes to my code in my object's class with a check for the API level, so that ObjectAnimator
and AnimatorListener
stuff wouldn't be called unless the API level is 11+.
The problem is that my object is implementing AnimatorListener
even though its functionality isn't being used in all versions of the code. I think this is leading to an VerifyError
on start up of my app because now it crashes on devices with API level 10 and down.
Is there a way to conditionally implement an interface based on the API level or a different way to achieve the same thing?
Thanks!