title: Best UI design to handle no internet connection
body: <p>My app like many others needs an internet connection constantly. In my main activity I have:</p>
  
  <pre><code>@Override
  public void onStart() {
      if (!isOnline()) {
          Intent disconnected = new Intent(this, Disconnected.class);
          startActivity(disconnected);
      }
      else {
          ...
      }
  }
  </code></pre>
  
  <p>The Disconnected activity displays a TextView with a message and a retry Button.
   Now the problem with this is that if the user presses back he immediately ends up in the Disconnected activity again and isn't able to exit the application using back.
  What's an elegant way to handle no internet connection? My main activity is a ListView, should I just have hidden Views that only appear when there's no connection? (I don't feel this is the right way though).</p>