title: When and how to prevent a god activity in Android
body: <p>I know this question might not be one which has just one correct answer. But letting me know, that there are several solutions with good reasons for each of them, would already help a lot. So here we go:</p>
  
  <p>I have designed an app which manages persons along with measurement data for each person. The data can be displayed in a chart. Generally this leads to the following tasks:</p>
  
  <ul>
  <li>Person: Add</li>
  <li>Person: View</li>
  <li>Person: Edit</li>
  <li>Person: Delete (more an option with a security dialog than a real screen)</li>
  <li>Measurements: View (List)</li>
  <li>Measurement: Add</li>
  <li>Measurement: Delete (again more an option with a security dialog)</li>
  <li>Measurements: Plot (in a large graph view)</li>
  </ul>
  
  <p>The app will run on a phone at first. I have read that an activity is supposed to serve a very limited purpose, so the scenario would lead to one activity for each task.
  However, when the app is displayed on a tablet in landscape mode, I can imagine to have three sections on the screen at once:</p>
  
  <ul>
  <li>One section in the top right cornern managing persons</li>
  <li>One section below that listing the values for the selected person</li>
  <li>One larger section on the right part of the screen to plot measurements</li>
  </ul>
  
  <p>I often read that I should avoid to create god activities. On the other hand I read that fragments is the way to go, so that each screen can easily be displayed as a subscreen on a tablet, as it is planned here.</p>
  
  <p>I started off with creating the app for mobile phones, so I created one activity, which juggles all fragments (almost one for each task) in a single fragment container.</p>
  
  <p>Is this the way to go, when I want to do it by the book?</p>
  
  <p>I was wondering whether I should create a separate activity for each task. For the phone this makes things easier. But on a tablet I would have to control the fragments from one single activity anyway, correct? So in that case a god activity it needs to be?</p>