prajaa / MyInstagramClient

0 stars 0 forks source link

[Android Bootcamp] Day 4 Assignment #4

Open prajaa opened 8 years ago

prajaa commented 8 years ago

My app is ready , please review. /cc @codepathreview @codepath. Name: Prajakta Link to Video - https://github.com/prajaa/MyInstagramClient/blob/master/app/src/main/res/drawable/day4.gif

Covers user stories:- Add pull-to-refresh for the home feed with SwipeRefreshLayout. User can open the Instagram client offline and see last loaded feed. Each media item is persisted into SQlite and can be displayed from the local DB. Create a background service to make the network request, load items into the DB and populate the view (for the user's home feed).

codepathreview commented 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.

  // 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.beginTransaction();
   try {
     ...
     db.setTransactionSuccessful();
   } finally {
     db.endTransaction();
   }
  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");