Android animation fillenabled, Fillbefore, fillafter understanding

Source: Internet
Author: User

Fillbefore is the first frame of the animation at the end of the animation; The default value is true

Fillafter refers to the end of the animation is the last frame in which the picture stays in this animation. The default value is false

but the wonderful is Google and added a fillenable variable, this variable is simply a pit-daddy ...

Source:

android.view.animation . Animation . Java 854 Line

if((Normalizedtime>= 0.0f|| Mfillbefore)&& (Normalizedtime<= 1.0f|| Mfillafter)){

if(! mstarted ){

fireanimationstart();

mstarted = true;

& nbsp;               if ( use_closeguard ) {

guard. Open ("Cancel or Detach or gettransformation");

               }

           }

           if(mfillenabled)Normalizedtime= Math.Max(Math.min(Normalizedtime,1.0f),0.0f);

if (mcycleflip) {

Normalizedtime = 1.0f- normalizedtime;

           }

& nbsp;           Final float interpolatedtime = minterpolator getinterpolation ( normalizedtime );

applytransformation(interpolatedtime, outtransformation );

       }

1,fillenable=falsewhen theFillbeforeand theFillaftervalue is ignored, at which point thefillenable=flaseTime andFillbefore=trueandfillafter=true, andfillenabled=trueequivalence, that is, the beginning of the end will beFillThe pit Daddy ...

2 , fillenable = true when the Fillbefore = True , Fillafter = False

only in the first frame Fill

3 , fillenable = True when the Fillbefore = False , fillafter=true

only at the last frame Fill

4 , fillenable = True when the Fillbefore = False , Fillafter=false

This control is also compared to the pit father, from the variable name to understand that as long as Fillenable=false just fine, other when Fillenable=false time to return to the first 1 kind of situation is too pit dad.


All right. The person who wrote this code is completely dizzy ...

Android animation fillenabled, Fillbefore, fillafter understanding

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.