title: Android design pattern to manage UI elements
body: <p>The answer to this question would be a design-pattern, to be used in development of Android applications, that simplifies the way user interface elements are managed such that many such elements can be managed centrally even though acted upon from various places in the application.</p>
  
  <p>Given a small application without too many states, managing UI elements in the activity life cycle methods is fine.  If the application grows and can change states based on processes <em>outside the main thread</em>, the number of places where changes are being made increases.  This makes the application less maintainable (having state changing code in many places).  I seek a design pattern that makes it more clear what happens to the UI in the various states. </p>
  
  <p>I realize that persistence tools such as <code>SQLiteDatabase</code> and<code>SharedPreferences</code> are available, which might be part of the design pattern, but central control, where the state of the app can be maintained, along with control over what the user sees and what the user is able to do is the goal.</p>