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 Animations and Transitions Animations Basics Property Animation

michael lee
michael lee
5,179 Points

challenge 1 of 3

I was thinking maybe I oversimplified this challenge, but what an I missing?

// Use the variable named 'imageView'
 public void animate();

1 Answer

Tonnie Fanadez
.a{fill-rule:evenodd;}techdegree seal-36
Tonnie Fanadez
UX Design Techdegree Graduate 22,796 Points

Hi Lee

animate() method is the easiest form of animation for views. It allows us to configure the animation using method chaining called straight from the a view Object.

See the code solution for this challenge below; Since you are not creating a new method you don't need the return type(void).

Simply call animate() from the imageView.

scaleX() is the width while scaleY() is the height. To double the height and the width you just put a 2. Don't forget to call start() method so that the animation can go live.