You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first one should be the good way, the second one is a dirty hack and not a solution, don't use that code or you end in hell.
But it's here to show the problem. The first code sticks at frame[0] in Android 4 but works well in 5. The second one sets the same drawable as background and as drawable, that results in some references. If I use getBackground to get my object back, I can run play on it and both starts! I guess we need a function like getImageDrawable, to fix it in a better way for Android 4.
I could implement that, if you like. I leave that here for discussion.
The text was updated successfully, but these errors were encountered:
msphn
changed the title
Bug with
Bug with AnimationDrawable in Android 4
Aug 13, 2015
The bug exists in Android 4.* as far as I know, it's not reproducible in Android 5.*. It broke in API 15 and 17.
If you put a AnimationDrawable as a drawable to the ImageViewTouch, the animation does only start in Android 5.
I guess it's sort of a timing problem, I could work around by wasting with the object stack.
Example animation-list:
Example code how it works in Android 5 but not in Android 4:
How it actually works in Android 4:
The first one should be the good way, the second one is a dirty hack and not a solution, don't use that code or you end in hell.
But it's here to show the problem. The first code sticks at frame[0] in Android 4 but works well in 5. The second one sets the same drawable as background and as drawable, that results in some references. If I use getBackground to get my object back, I can run play on it and both starts! I guess we need a function like getImageDrawable, to fix it in a better way for Android 4.
I could implement that, if you like. I leave that here for discussion.
The text was updated successfully, but these errors were encountered: