title: Android How sort and reverse sort in single Button clcik
body: <p>I want to sort and reverse sorting in single button click but i able to did only one, how can i implement this sorting and reverse sorting in consecutive button clicks.</p>
  
  <pre><code> btn.setOnClickListener(new OnClickListener() {
  
          @Override
          public void onClick(View v) {
              // TODO Auto-generated method stub
  
              Comparator&lt;Book&gt; bb=Collections.reverseOrder();
                  bk=Arrays.asList(books);
                 Collections.sort(bk,bb);
                  //Collections.shuffle(bk);
               // Collections.sort(bk);
                  bookListView.invalidateViews();
  
          }
      });
  </code></pre>