Open kennethpu opened 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.
nice work. A few notes after checking out the code:
Tweet
and User
. See the persistence guide and this other guide for more details.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.
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!