Skip to content

Conversation

@CodyRoy
Copy link

@CodyRoy CodyRoy commented Mar 6, 2017

loads

Copy link
Contributor

@stswidwinski stswidwinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is right in that the photo was too large. However, the solution has a bug :)

sizes = response.getJSONObject("sizes").getJSONArray("size");
photoUrl = sizes
.getJSONObject(sizes.length() - 1)
.getJSONObject(sizes.length() - 3) //finding a smaller size will speed up load times
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug:

what if the length of sizes is less than 3?

Response.ErrorListener errorListener = new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
//things2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh?

//things2
}
};
//solution is deprecated: better, worse or equivalent to hacky?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants