I have a scenario where I click on a ListFragment and start a new activity, as shown below:
public void onListItemClick(ListView l, View v, int position, long id) { super.onListItemClick(l, v, position, id); Intent intent = new Intent(getActivity(), VenueBeerActivity.class); Parcelable wrapped = Parcels.wrap(mAdapter.getItem(position)); intent.putExtra("venue", wrapped); startActivity(intent); }
This works great and displays new activity.
I changed this manifest of activity, so it indicates its parent activity (in this case, the main activity)
However, the problem is when the back button is pressed, it reloads the entire parent. The parent is a list, and I do not want him to reload the user’s position. How can I prevent this?
As a note. The parent has a page with page separators.
I am sure this is a relatively simple fix ...
source share