title: simple example on how to use SwipeRefreshLayout with ListView
body: <p>Does anyone have a simple example on how to use  SwipeRefreshLayout with a ListView? Here is my situation:</p>
  
  <p>I have a class SynchDogs that pulls data from the server. So that class serves as the source for my adapter. I want to use  SwipeRefreshLayout for refreshing the adapter and so the ListView. DogActivity is an Observer of SynchDogs so that DogActivity implements an <code>update</code> method that is called when new data is ready.</p>
  
  <p>So I implement <code>onRefresh</code> as</p>
  
  <pre><code>@Override
  public void onRefresh() {
      SynchDogs.getInstance().synchronizeWithServer();
  }
  </code></pre>
  
  <p>So I am supposing this is all I need to initiate the start of pull-to-refresh. If so, inside <code>update</code> what do I do to end the call?</p>
  
  <p>I also already have</p>
  
  <pre><code>swipeLayout = (SwipeRefreshLayout) findViewById(R.id.swipe_container);
  swipeLayout.setOnRefreshListener(this);
  swipeLayout.setColorScheme(android.R.color.holo_blue_bright, 
          android.R.color.holo_green_light, 
          android.R.color.holo_orange_light, 
          android.R.color.holo_red_light);
  </code></pre>
  
  <p><strong>update</strong></p>
  
  <p>Basically, I want to know the call for stopping the color show.</p>