title: Sort dates in descending order
body: <p>I want to sort my object that has dates in descending order. Here is the code I use in my fragment - </p>
  
  <pre><code>int pos = adapter.contains(status.id);    
  if (pos == -1) {
      myobj = new MyAdapter.Mymyobj();
      myobj.status = status;
      adapter.addItem(myobj);
  } else {
      myobj = adapter.getItem(pos);
      myobj.status = status;
  }
  convertStringToDate(myobj.status.getTimeInString());
  sortDates.add(convertedDate);
  Comparator&lt;Date&gt; cmp = Collections.reverseOrder(null);
  Collections.sort(sortDates, cmp);
  
  adapter.notifyDataSetChanged();
  
  private Date convertStringToDate(final String dateString) {
      SimpleDateFormat dateFormat = new SimpleDateFormat("dd.MM. HH:mm");
      try {
          convertedDate = dateFormat.parse(dateString);
      } catch (ParseException e) {
          e.printStackTrace();
      }
      return convertedDate;
  }
  </code></pre>
  
  <p>The above code is not working..Nothing is happening actually. I want the list to be in descending order.
  Should I do something in adapter as well?</p>