I have a ListView and on clicking a list item, it starts another activity.
So my problem is that, when I click on list item, it should change its background and move to another activity and on pressing back on this activity the list item should retain it changed background color. And again clicking on another list, it should remove the earlier background color and again do the same.
Thanks in advance.
I solve it by setItemChecked() methood and use android:choiceMode=”singleChoice” inside ListView in my layout xml file. I used
MyClass.this.getListView().setItemChecked(position,true);on clicking the Item in the list and the on getView() i am doing this…