kennethpu / squawker-android

Simple Twitter client for Android
0 stars 0 forks source link

[Intro to Android] Assignment 3 - Review my app #1

Open kennethpu opened 8 years ago

kennethpu commented 8 years ago

My app is complete, please review. Thanks! /cc @codepathreview @codepath

I noticed over the course of this project that my method calls were getting a little messy (calling activity methods from fragments, trying to call a fragment method in an activity from another activity, etc..). Would love to hear more about best practices around this!

nesquena commented 8 years ago

I noticed over the course of this project that my method calls were getting a little messy (calling activity methods from fragments, trying to call a fragment method in an activity from another activity, etc..). Would love to hear more about best practices around this!

We will be looking at Fragment's in detail this week. In general though, it's important to never call activity methods in fragments, or try to interact with a fragment from anywhere but the parent activity. You want to use the listener pattern extensively and adhere to these 3 ways to communicate to and from a fragment. In general, the activity that owns the fragment should be the controller for all data going into and leaving the fragment and should the fragment should only communicate back the activity using interfaces. Hope that helps, we will be discussing more soon.

codepathreview commented 8 years ago

nice work. A few notes after checking out the code:

Here's a detailed Project 3 Feedback Guide here which covers the most common issues with this submitted project. Read through the feedback guide point-by-point to determine how you could improve your submission.

Let us know if you have any other thoughts or questions about this assignment. Hopefully by now you feel pretty comfortable with all the major pieces to basic Android apps (Views, Controllers, ActionBar, Navigation, Models, Authentication, API Communication, Persistence, et al) and see how they all fit together. We are close now to a turning point in the course where you should be hitting a "critical mass" towards your knowledge of Android.