Errata chapter 16


#1

The navigational code(code used to identify where to place new code) is a bit off for Listing 16.3. It might cause some issues getting the proper menu up if not placed correctly like for me.

The correct Navigational code should read

@Override
	public void onResume() {
		super.onResume();
		((CrimeAdapter)getListAdapter()).notifyDataSetChanged();
	}

not

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
((CrimeAdapter)getListAdapter()).notifyDataSetChanged();

as read in the listing.


#2

Thanks for keeping an eye out. We’re about to send fixes to the printer for our second printing (!), so I’ll see if we can’t fix it.


#3

Alright! Congrats! A quick question for you. I am running the app on an emulator, but it is not displaying the app like in my layout xml files. For one, it is not displaying the android icon at the top of the app and now not displaying the caret to test hierarchical navigation in CriminalIntent. Is this just an emulator thing?


#4

Probably? What version is your emulator? And do you see the same thing when running our solutions?


#5

I have a question.
In Listing 16.17 we set variable:
mSubtitleVisible = false;

Why? What is the purpose?


#6

It initializes the mSubtitleVisible instance variable.