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 trialNick Miller
4,417 PointsWhere am I going wrong?
The problem given:
"Below the TextView line, declare an AlphaAnimation variable named fadeOutAnimation. Use the AlphaAnimation constructor that takes two parameters: the start alpha and end alpha values. Set the start alpha parameter as completely opaque and the end alpha parameter as completely transparent."
My answer:
'''Java
AlphaAnimation fadeOutAnimation = new AlphaAnimation(0, 1);
'''
It's saying I'm wrong, but I can't figure out why.
1 Answer
Ben Rubin
Courses Plus Student 14,658 PointsJust switch the order of the 1 and 0. A 1 means completely opaque and a zero means completely transparent. The first parameter is the starting transparency and the second parameter is the ending transparency.
Nick Miller
4,417 PointsNick Miller
4,417 PointsNevermind! I had my 1 and 0 switched. Doh!