Open SiriusZael opened 8 years ago
Good job finishing all the stories. Below we've captured the most common issues with today's stories. Read through this point-by-point to determine how you could improve your submission.
AndroidManifest.xml
file, a Service is by default not accessible by other applications (i.e., exported = false
) if it has no intent filters. See Service elements in Manifest File for a detailed explanation.ViewGroups
should be avoided, since this can affect the time that it takes to render the layout. See the following article on how Android draws views. A good number of ViewGroups
do multiple traversals of their view hierarchies to calculate how much screen real estate all of its contents should receive. // this is the join table for posts and comments
db.delete(TABLE_POSTS_COMMENTS, null, null);
// posts reference both users and images
db.delete(TABLE_POSTS, null, null);
db.delete(TABLE_COMMENTS, null, null);
// users and images refer to no other tables
db.delete(TABLE_IMAGES, null, null);
db.delete(TABLE_USERS, null, null);
db.endTransaction()
is called regardless of whether an operation fails or not: db.beginTransaction();
try {
...
db.setTransactionSuccessful();
} finally {
db.endTransaction();
}
InstagramPost
class implements Serializable
, to package a list of posts into an intent, a serializable wrapper is needed. This is fine for the assignment.InstagramPost
is that it contains nested objects. See this article, which shows how nested parcelable objects are marshalled and demarshalled.InstagramPost
implements Parcelable
instead of Serializable
, you can do this: List<InstagramPost> posts = new ArrayList<InstagramPost>();
Intent intent = new Intent();
intent.putExtra("posts", posts);
// Extracting data on receipt of intent
List<InstagramPost> fetchedPosts = getIntent().getParcelableArrayListExtra("posts");
My application is ready for review /cc @codepathreview @codepath