I'm little bit fed up with the device back button functionality.
I have two activities. From 1st I go to 2nd and display one item through array in ListView
and when I presses the back button i came back to 1st activity.
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.
Means it is not removing the previous item when i presses the back button.
I have used:
public void onBackPressed ()
{
for(int i=0; i<sub_categories.length;i++)
{
sub_categories[i]="";
}
Log.d(this.getClass().getName(), "*****************back button pressed");
}