Error in listing 22.8?


#1

In listing 22.8, getLayoutResId() returns R.layout.activity_twopane. Shouldn’t this be R.layout.activity_masterdetail?

Listing 22.4 says to change this to activity_masterdetail, and returning activity_twopane causes two panes to be displayed on every device, even smaller phones.


#2

Indeed, you are correct. I’ll add it to the errata.