Errata for Android Programming Tutorials
A quick reminder: if you see problems in the book that are not listed here, report them via the Book Bug Bounty program!
Version 1.9 - January 2010
- On page 40, the sample code shows the use of
R.id.name, which in this case should beR.id.title
Version 1.1 - November 2009
- Page 16, underneath Figure 7, has "Use the directional pad (D-pad) below the [MENU] button", which should now be "Use the directional pad (D-pad) above the [MENU] button".
- Pages 38-39 show the XML for the layout for a row in the LunchList tutorial. That row has a widget (
@+id/name) that duplicates the name in the layout for the overall activity. This is bad form and can lead to bugs. This problem gets resolved in the next tutorial, as the two same-named widgets will be contained in separate tabs and so will not conflict with each other. Future editions of this book will give these two widgets separate names. - Page 67 has
R.id.titlewhere it should haveR.id.name.
Version 1.0 - June 2009
- On page xix, the link to the knol is incorrect. Click here to visit the knol in question. You may also be interested in the AndMob wiki.
- Pages 40-41 show the XML for the layout for a row in the LunchList tutorial. That row has a widget (
@+id/name) that duplicates the name in the layout for the overall activity. This is bad form and can lead to bugs. This problem gets resolved in the next tutorial, as the two same-named widgets will be contained in separate tabs and so will not conflict with each other. Future editions of this book will give these two widgets separate names. - Page 40 mentions "three icons" that you will need to set up for your layouts. However, it fails to mention that
these need to be named
ball_red.png,ball_yellow.png, andball_green.png, all located inres/drawable/in your project. Note that the file types could be different (e.g., JPEG instead of PNG), but the base names (e.g.,ball_red) are important. - Page 98 should include a code listing for the new
populateFrom()method onRestaurantWrapper. You can find this code on page 105-106. - Page 98 also shows
newView()populating the row. That is not necessary —bindView()will be called afternewView()on the row returned bynewView(). Hence, allnewView()needs to do is inflate the row. - On page 148, the name of the
onRetainNonConfigurationInstance()method is missing the "Non" part.
Version 0.9 - April 2009
- On page 191, the tutorial indicates that the local service is a singleton, "accessible from a static method on the service class". Actually, it is only a public static data member on the service class.