Android window animation modification and production experience, Android window animation experience

Source: Internet
Author: User

Android window animation modification and production experience, Android window animation experience

Extract the token. If you extract the Token, you will find the file in it.
It is garbled, so we need to decompile the file to edit it.
Please refer to this post http://bbs.lidroid.com/forum.php for decompilation and decompilation? Mod = viewthread & tid = 102159 & extra = page % 3D1% 26 filter % 3 Dtypeid % 26 typeid % 3D14% 26 typeid % 3D14
After the decompilation is complete, we can open the anim file and browse the code in it. Android plotting has four basic codes



  • 1. alpha gradient transparency animation effect 1 is not transparent, 0 is completely transparent
  • 2. Scale gradient scaling animation effect 1 is the original size 2 is twice the size
    FromXScale [float] fromYScale [float] It is the scaling size on the X and Y coordinates when the animation starts.
  • PivotX [float]
    Ty [float]
    It is the starting position of the animation relative to the X and Y coordinates of the object.
  • PivovX and pivovY are the zooming center of the image.
  • 3. translate the animation effect after converting the position of the screen
  • FromXDelta
    ToXDelta
    It is the position on the X coordinate at the animation end and start.  
    FromYDelta
    ToYDelta
    It is the position on the Y coordinate of the animation and the start point of the animation.  
     
  • 4. rotate screen transfer rotation animation effect
  • FromDegrees It is the angle of the object when the animation starts. Description
    If the angle is negative, it indicates clockwise rotation.
    If the angle is positive, it indicates clockwise rotation.
    (Negative from -- to positive: clockwise rotation)
    (Negative from -- to negative: counter-clockwise rotation)
    (Positive from -- to positive: clockwise rotation)
    (Positive from -- to negative: clockwise rotation)
    ToDegrees The Rotation Angle of an object can be greater than 360 degrees when the animation ends.
    PivotX
    Ty
    It is the starting position of the animation relative to the X and Y coordinates of the object. Note: The preceding two attribute values are from 0% to 100%.
    50% indicates the point position on the X or Y coordinate of the object.

After understanding the meaning of the above four codes, you can understand how to modify and get your favorite special effects.
I am using Baidu many times, but I find that the control objects of these control files on many forums are vague.
After many days of testing and exploration, I pasted the special effects of the control of several files below.
Open the dialog box described in dialog_enter
The dialog box described in dialog_close is closed. For example, if you enter the File Manager and press a folder, a dialog box is displayed, showing various file operations, such as copying and cutting.
Inputmethod _ starts with the control input method.
Lock_screen_behind_enter
Lock_screen_enter
Lock_screen_exit
These three items are used to control the screen lock. The first is to control the changes that will be unlocked back to the desktop after the screen lock, and the third is to control the changes in the screen that will be overwritten on the desktop.
Options_panel_enter
Options_panel_exit
These two animations are used to control the animation when you click the function key on the desktop.
Task_close_enter
Task_close_exit
Task_open_enter
Task_open_exit
These four animations are used to control task switching. For example, if you switch from the text message interface to the qq interface, the first one is the animation of another program when the program is closed. For example, if you open the text message and then Open qq, at this time you press the return key, QQ is the closed program, at this time the text message is another program, he controls the text message to enter the special effect
The second is the special effect of program shutdown and exit, which is the animation during qq exit.
The third is the special effect that the program enters when the program is opened, such as opening the text message first, then opening the special effect that qq and qq come in.
The fourth is the special effect that the old program exits when the program is opened, that is, the special effect that the SMS exits.
App_starting_exit
This is the special effect when the program exits.
Activity_close_enter
Activity_close_exit
Activity_open_enter
Activity_open_exit
Have you found that this group is very similar to the previous group? If you simply translate it into Chinese, you can't tell the difference between a task and an activity. In fact, it turns into a task
There are several activities that are attached to an application's switchover page. What I understand is the special switching effects of the Setting buttons in the mobile phone settings.
Wallpaper_close_enter
Wallpaper_close_exit
Wallpaper_open_enter
Wallpaper_open_exit
These four are the effects when you start and exit the program, which is also the purpose of my initial animation modification, but it was discovered by the last one, android native exit the special effect is a process where a rectangle keeps getting smaller and becomes a rectangle of 0.5 times. I have always felt uncomfortable for the reason why it never changes to 0.1 times, let's not talk much about it. The first one is to understand it by file name. When the wallpaper is closed, the animation is the one that starts qq and qq on the desktop to enter the plane.
When the second wallpaper is disabled, it is the animation when you start qq on the desktop, the animation when the desktop exits, and the animation when the third wallpaper appears, that is, you exit from qq to the desktop, the animation displayed on the desktop, the last wallpaper to enter, the exit animation, is the animation that exits from qq to the desktop, and qq disappears. These four are the inspirations that suddenly occurred last night. They almost gave up because they didn't know why they were modified before.
However
Wallpaper_enter
Wallpaper_exit
Wallpaper_intra_close_enter
Wallpaper_intra_close_exit
Wallpaper_intra_open_enter
Wallpaper_intra_open_exit
I have not understood these six items. Who knows how to tell me? What is the internal animation effect of wallpaper for intra? I don't know.

Example:
For example, if you think the unlock screen is too monotonous and want a zoom effect, open the unlocked control file.
<? Xml version = "1.0" encoding = "UTF-8"?>
<Set android: interpolator = "@ anim/accelerate_interpolator"
Xmlns: android = "http://schemas.android.com/apk/res/android">
<Alpha android: duration = "@ integer/config_longAnimTime" android: fromAlpha = "0.6" android: toAlpha = "1.0"/>
</Set>
Android: interpolator defines the animation speed, and accelerate_interpolator indicates acceleration.
The fourth line of alpha transparency duration indicates the animation time. It is followed by "@ integer/config_longAnimTime". You can change long to short or medium, which are defined in other files, or simply change it to a number in milliseconds. The above animation changes from the opacity of 0.6 to the opacity of 1 in longanimtime. We will add the following code after this
Scale android: duration = "@ integer/config_longAnimTime" android: shorttx = "50.0%" android: 0000ty = "50.0%" android: fromXScale = "2.5" android: toXScale = "1.0" android: fromYScale = "2.5" android: toYScale = "1.0"/>

You don't need to write this function yourself. Just open a file and find the scale function that sticks the format. The dark blue part defines the center of scaling as the center of the screen, the light blue part is the initial and end dimensions of the abscissa, followed by the initial and end dimensions of the ordinate.
After some experiments, I think that the upper left corner of the screen is the coordinate zero point, and the right is the square direction of x. The downward direction is the positive direction of y. However, I don't know how to read some code in this coordinate system.

So much, just compile these edited files back to test.


How does android change the window switching animation?

To change the framework, find the framework beautification of your mobile phone model on the Internet. You should attach a tutorial. Generally, simply replace the framework in the system and restart it. Root is required.

Change the window animation of Android 23

Go to UOT kitchen modify tutorial B bs. hiapk. co m/thread-1375263-1-1.ht ml

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.