Android Back Button functionality
<p>I'm little bit fed up with the device back button functionality.</p>

<p>I have two activities. From 1st I go to 2nd and display one item through array in <code>ListView</code> and when I presses the back button i came back to 1st activity.</p>

<p>when I again go to 2nd activity to display the item once again it showing me the previous items at 1st row and then the same item in the second row as well.</p>

<p>Means it is not removing the previous item when i presses the back button.</p>

<p>I have used:</p>

<pre><code> public void onBackPressed ()
  {
      for(int i=0; i&lt;sub_categories.length;i++)
      {
          sub_categories[i]="";
      }
      Log.d(this.getClass().getName(), "*****************back button pressed");

  }
</code></pre>
