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 trialRydell Ward
10,215 PointsMy Ribbit app stalls when the FriendsFragment resumes
So far my app works as i switch back and forth between activities within the Ribbit app. But after a short while when I resume to the FriendsFragment no friends are being loaded. The progress bar just keeps spinning. This doesn't happen immediately when I first open the app but after a short time of use.
I ran the debugger and made sure mCurrenUser and mFriendRelation isn't null. The code seems to stop once i set the progress bar visibility to true.
@Override
public void onResume(){
super.onResume();
mCurrentUser = ParseUser.getCurrentUser();
mFriendRelation = mCurrentUser.getRelation(ParseConstants.KEY_FRIENDS_RELATION);
getActivity().setProgressBarIndeterminateVisibility(true);
ParseQuery<ParseUser> query = mFriendRelation.getQuery();
query.orderByAscending(ParseConstants.KEY_USERNAME);
query.findInBackground(new FindCallback<ParseUser>() {
@Override
public void done(List<ParseUser> friends, ParseException e) {
getActivity().setProgressBarIndeterminateVisibility(false);