2359media / EasyAndroidAnimations

Apache License 2.0
1.39k stars 313 forks source link

Restart Animation By Clicking #4

Closed tiensi closed 9 years ago

tiensi commented 9 years ago

Hello, I added code to the demo that would allow users to reset animations that couldn't be replayed by tapping on the screen. This way small device users wont have to go back in order to replay an animation.

This was done by refactoring some of the onCreate code into a new "setUpById" method. This method is called in order to reset the original positions of the images that were animated. The FrameLayout containing all the Imageviews was given an Onclick method to call this setUpById method when the users want to replay an animation. An "isFinished" boolean determines whether or not the animation that can't be reset is completed or not.

Unfortunately, only transferAnimation does not replay when tapped

umairvatao commented 9 years ago

Thanks for your contribution, appreciate it!!