Remove addToBackStack(null) in Fragment samples which causes a blank screen when pressing the back button

I'm not sure if there's a reason for this line in each Fragment sample:

    transaction.addToBackStack(null);

but it seems that this is causing a blank screen to be displayed when pressing the back button rather than exiting the sample. Pressing the back button again (or the up button) exits as expected.