title: How to sort the CursorLoader results?
body: <p>I use CursorLoader to query a result, which is not the order that I want to show in the ListFramgenet. How to sort it ?</p>
  
  <p>I use this to set the adapter:</p>
  
  <pre><code>    mAdapter = new SimpleCursorAdapter(getActivity(),
              android.R.layout.simple_list_item_2, null,
              new String[] { "name", "distance"},
              new int[] { android.R.id.text1, android.R.id.text2 }, 0);
      setListAdapter(mAdapter);
  
      // Start out with a progress indicator.
      setListShown(false);
  
      // Prepare the loader.  Either re-connect with an existing one,
      // or start a new one.
      getLoaderManager().initLoader(0, null,  this);
  </code></pre>
  
  <p>Create loader :</p>
  
  <pre><code>public Loader&lt;Cursor&gt; onCreateLoader(int id, Bundle args) {
  
      return new CursorLoader(getActivity(), 
              Uri.withAppendedPath(TraceTable.CONTENT_URI, "latest"),
              MEMBERS_PROJECTION,
              null,
              null,
              null);        
  
  }
  
  
  public void onLoadFinished(Loader&lt;Cursor&gt; loader, Cursor data) {
      mAdapter.changeCursor(data);
  
      // The list should now be shown.
      if (isResumed()) {
          setListShown(true);
      } else {
          setListShownNoAnimation(true);
      }
  }
  </code></pre>
  
  <p>Well, there are latitude and longitude the queried results. I want to calculate the distance between my location and these results. and sort by distance asc.</p>
  
  <p>How to sort it? Any answer will be appricated</p>