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!
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
Nicholas Notte
729 PointsCrystal Ball, Stage 3, Pretty Little Things, Animation quiz help please
Challenge task 1 of 4 Define a method called 'animateFrog()' and put the existing line of code that declares the 'frogImage' variable inside the curly braces of the new method. Make the method public, return nothing (void), and have no parameters.
package com.example;
import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.ImageView; import android.graphics.drawable.AnimationDrawable;
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
ImageView frogImage = (ImageView) findViewById(R.id.frog);
}
1 Answer

Luke O'Neill
7,822 PointsIll let you figure out what to put inside of the method. But the first part is just telling you to make a new method that is void and has no parameters.
public void animateFrog(){
//put the frogImage in here
}