Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Simple Android App (retired 2014) Pretty Little Things Animating the Crystal Ball

Animating Crystal Ball

<item android:drawable="@drawable/ball01" android:duration="41"/> . . .

<!-- Reset to original --> <item android:drawable="@drawable/ball01" android:duration="10"/> 1.Can anyone Please explain android:duration ?

  1. Y it is "41" for first and "10" for the last .. Difference between their time ?

2 Answers

Aaron Arkie
Aaron Arkie
5,345 Points

Hello! are you talking about this line of code?

private void animateAnswer(){

        AlphaAnimation fadeInAmation= new AlphaAnimation(0, 1);
        fadeInAmation.setDuration(1500);
        fadeInAmation.setFillAfter(true);

        mAnswerLabel.setAnimation(fadeInAmation);

    }

Hey Aaron , .. ! no , not this line , it may be in java class . i was asking about the drawable which is define in XML <item android:drawable="@drawable/ball01" android:duration="41"/> 1.android:duration="41" ?

.