Howdy! Chris Stewart here. One of the authors of the 2nd edition.
I will try my best to capture errata from the 2nd edition of the book in this post organized by chapter. If you spot anything, please make a new post about it in the chapter-specific forums. I’ll keep a summary here.
Last Updated: 7/24/2016
##2nd Edition, 2nd Printing
In figure 9.11 Custom List Item Layout (
list_item_crime.xml): The RelativeLayout should have
wrap_content set as the
match_parent is used, as it is in the book, the rows in the RecyclerView will be the same height as the RecyclerView itself. There was a recent change in how RecyclerView works that made this an issue (it wasn’t always a problem!).
##2nd Edition, 1st Printing
The 2nd printing of the book has been released and fixes all of the issues that you see below. This pdf includes ALL of the changed pages from the 1st printing to the 2nd printing.
2nd Edition, 1st Printing Addendum:
The addendum includes the most important changes below in more detail, with pictures, and is easily printable.
- Always use “Empty Activity” and never use “Blank Activity” when creating a new project or Activity. Blank Activity comes with extra code that you do not need. What you see in the book will match the empty activity template except for one difference:
The empty activity template does not include a menu. The onCreateOptionsMenu and onOptionsItemSelected methods won’t be there (just leave them out of your own code even if you see them in the book). Also, a menu file in res/menu/ will not exist as well. Do not worry about this difference. You will not need the menu system until you get to the Toolbar chapter. In that chapter, the menu system will be fully explained.
5. Your Second Activity
- In the sentence before Listing 5.10 - “Speaking of other code, use this new method in CheatActivity’s cheat button listener now.” CheatActivity should be QuizActivity.
20. Styles and Themes
- Listing 20.13 - instead of overriding android:button style, override buttonStyle (without the android prefix). viewtopic.php?f=571&t=10307&p=29509