title: listview collapse previous list item
body: <p>I'm trying to expand &amp; collapse lists in list view using this code.</p>
  
  <pre><code>public void onClick(View v) {
      if (item.getVisibility() == View.GONE) {
          item.setVisibility(View.VISIBLE);
      } else {
          item.setVisibility(View.GONE);
      }
  }
  </code></pre>
  
  <p>Here, if I expand another list the first one stays expanded until I touch/click it again.
  Is there a way to collapse the previous list on touch or click of expanding next list item of list view.</p>