Android mobile guard translation animation example
This paper realizes the translation animation between the following interfaces
analysis:
During the movement of the navigation interface, pan the animation
Move previous page to animation (- screen width, y) ---- > (0, y)
Move animation out of previous page (0, y) ------------ > (screen width, y)
Move next page into animation (screen width, y) ---------- > (0, y)
Move next page out of animation (0, y) ---------- > (- screen width, y)
Create a new anima folder under the res folder and four translate XML type file
The relevant codes are as follows:
pre_ in_ anim. xml
pre_ out_ anim. xml
next_ in_ anim. xml
next_ out_ anim. xml
Then add the following code to the button click event in the code of the four interfaces
Add to the prepage button:
Add to the NextPage button:
The above is the translation animation of Android mobile guard introduced by Xiaobian. I hope it will help you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!