You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nice job learning about opening web pages via intents!
To improve yourself as a developer, please take a look at the following feedback:
MainActivity.java review:
Great use of constants and not hard coding variables.
Variable names are clear and make sense.
Nice use of regions!
onCreate() is very short, nice job! Can make it even shorter by moving the check for first time running the app out into another method.
Great job naming helper methods.
initializeViews() extra white space for newlines at the end of the method should be removed.
DetailActivity.java review:
Great job with variable names!
Only one variable is private, you should make them all private.
onCreate() is very long, especially when compared to MainActivity.java.
helper and fab should be moved to initViews().
Too much white space newlines between methods. No reason to skip two lines between initViews() and setInfo().
fab.setOnClickListener() should be moved to its own method.
Line 64 and 70 use hardcoded strings, should be using strings.xml for snackbar strings!
textViewItemWebSite.setOnClickListener() should happen inside setViews() and NOT insidesetInfo().
Line 92 the key for "id" should be made a constant and re-used in line 63 of ResultsActivity.java.
You are missing java docs on each method for this class! Explain what each method does!
ResultsActivity.java review:
Great job with variable names!
Nice work making all variables private.
Line 27 variable favorites is not used. Remove it.
onCreate() is very long, you can shorten it up by moving code to setCursor(), setViews(), and initData().
The code
if (type.equals(MainActivity.KEY_FAVORITES)) {
cursor = mHelper.searchNeighborhoodByType(favorite);
} else {
cursor = mHelper.searchNeighborhoodByType(type);
}
//Create a cursor
cursor = mHelper.searchNeighborhoodByType(type);
is redundant. Your favorite string is never initialized so we never execute the first if statement, line 41-43. So remove this code. Line 44 and 48do the same exact thing, so remove one of them. Instead of the whole block you have above, you should just have type = getIntent().getStringExtra(MainActivity.KEY_TYPE); cursor = mHelper.searchNeighborhoodByType(type);.
Line 68 is an empty comment, remove it.
Line 64 is hard coded key that is used in DetailActivity.java and should be made constant and re-used on both activities.
The whole class is missing java docs and comments everywhere!
FavoriteActivity.java review:
Great job with variable names.
Variables should be made private.
Excellent job figuring out onResume() trick to keep you favorites screen up to date with newest data!
Line 48 with favoriteCursorAdapter you are creating a new adapter every time we leave and come back to the screen ( even if user takes a phone call and comes back to your app). This is doing more work then your app should be doing. You should instead check if the adapter is null, then initialize and set it, otherwise do nothing.
Missing java docs and comments throughout the class!
onCreate() is good size, nice job! You could make it smaller by using a setViews() method.
Line 34 the key "id" is hard coded and used three times in the project! Please make it into a public static final String KEY_ID = "id"; and re-used in all three locations.
FavoritesActivity.java is really the same as ResultsActivity.java and you could just re-use that activity and then check on the type of content that is passed in. You started that in ResultsActivity.java but never finished it.
StockholmItem.java review:
Great job with variable names and making them all private!
Missing java docs. Ideally one at top level of the class and java doc for each getter/setter method.
StockholmItemsManager.java review:
Great job with making public static final constants to be re-used throughout the project!
Good job managing the creation of objects in this class.
All addresses should be put into the strings.xml file.
Nice work adding comments.
NeighborhoodSQLiteOpenHelper.java review:
Great job using constants for all your sqLite commands.
Nice use of encapsulation making everything private.
Nice job using comments although you should also add java docs to each method to explain what it does.
return "No Website Found"; or return "No Address Found";, etc should all be made into private static final Strings.
Great work using packages inside of your project! You should create a package for activity and database and keep things separated. StockholmItemsManager is not a model, it is a manager class used for the database and should live in the database package along with the database helper class.
Remember to also start writing comments and java docs throughout your code!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Project 2 | ADI
Performance Evaluation
Score:
Based on the requirements, you can earn a maximum of 18 points on this project.
Your total score is: 17
PROGRESS REPORT
Student Check-in:
Great work on the project! Glad you learned about using web pages and opening them up via intents! Very clean code, good job with that!