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 Answer

fadeOutAnimation

I don't understand where I going wrong. This is the quiz I was working on which I believe is correct. However I get a compiler error on the last line pointing at the period (.) before the setFillAfter. Can some explain this error. thanks Daniel

TextView statusLabel = (TextView) findViewById(R.id.statusLabel);
AlphaAnimation fadeOutAnimation = new AlphaAnimation(1, 0);
fadeOutAnimation.setDuration(1000);
fadeOutAnimation.setFillAfter(true);

1 Answer

Ben Jakuben
STAFF
Ben Jakuben
Treehouse Teacher

One problem is that the duration should be 2 seconds at this point in the challenge. Then, the task you are on at this point is asking you to "use the 'setAnimation()' method of the statusLabel variable". The instructions spell it out pretty clearly, so get rid of your setFillAfter() line (it is not needed in this code challenge) and see if you can get the correct line from the instructions. If you continue to have trouble with it pop back in here and we'll help you get past it. :)