Chapter 7. UI Fragments and Fragment Manager

Hi everyone. So i’m following the tutorial in this chapter and for some reason after entering the code as followed on listing 7.7 page 140 the widgets are all in top of the others. I know at the time of the release of this book, the API was 21 and now i’m using version 29. How can i take care of this issue. Thanks in advance. By the way i purchased four edition but i would like to finish this one which is written in java.