![]() ![]() We need to set this variable as true after the first clap. private boolean firstClapCompleted = false So go ahead and create a boolean in your activity just like below and set it to false initially. So we need to use a flag to ensure that the translation effect in rise is shown only on the first clap. If you look closely in the actual medium animation, the circle scales up slightly more and also takes less time to complete the animation after the first clap. ![]() The nature of animation still remains the same, only the value by which they animate changes slightly. Moreover, there is slight variation in the scaling effect and the duration in which the animation( rise) is completed after the first clap. In the actual animation, it translates upwards only on the first clap and for all the subsequent claps the rise animation proceeds without the translation effect yet holding the scaling (expanding) effect. Here is the catch! The frame layout (enclosing the circle and clap count) doesn’t always have to translate upwards in the rise animation. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |