Added all the code for the chapter 2 example of an adjustable layout.