Fragment or activity


I need help! I am in chapter 1. I started writing my code in the fragment folder because this looked to be the place to put, but by chapter 2 and much research, I realized that I’m not sure if I should be coding in the fragment.xml or then activity.xml. Can anyone help get me going right?


I followed the book and used activities up through chapter 6. I didn’t touch fragments until chapter 7.