How to make my App modular?
<p>Hi and thanks for your attention.</p>

<p>I have an Android App (Java) whose code is growing (and eventually will need to grow more and more).</p>

<p>So I have to face the fact that I have make it somehow modular to make it manageable.</p>

<p>So I am here to ask some advice on how to go about it.</p>

<p>Basically the Apps consists of 2 screens, lets' call them A and B.</p>

<p>The App starts with screen A, which is a quiz, if the user responds correctly the screen B is displayed, showing the results; if the user wants to go on and take another quiz the App switches again to screen A, and so on in an infinite loop.</p>

<p>Please can you give me some advice no how to make this app more modular, to avoid all the code written in 'onCreate()'.</p>

<p>In particular how could I implement communication between the modules: how the Quiz module would communicate to the main and ask to switch the screen from A to B; how would the actions performed on screen B would communicate again to the main and ask to switch again to A.</p>

<p>I know it is a very open question, I am looking for some guidance, any suggestion very much appreciated.   </p>
