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 Self-Destructing Message Android App Adding Users Using Parse.com Adding a Progress Indicator

In the onCreate() method, add the line of code that requests the progress indicator window feature. Here's some helpful

i need help

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import com.parse.ParseUser;
import com.parse.ParseException;
import com.parse.SignUpCallback;

public class SignUpActivity extends Activity {

    public void onCreate(Bundle savedInstanceState) {

        // rest of code omitted

    protected void signUp(String username, String password) {
        ParseUser newUser = new ParseUser();
        newUser.signUpInBackground(new SignUpCallback() {
            public void done(ParseException e) {
                // some code omitted

2 Answers

Add this line in onCreate():

Chris Wolchesky
Chris Wolchesky
12,025 Points

You need to inform the system you would like to use the Progress Bar feature using requestWindowFeature(). The argument is a static member of the Window class, i.e. requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS).