From 1ad1eb8b8c4e3e9885b140e5059f72c49da3a0ac Mon Sep 17 00:00:00 2001 From: Ricky Barrette Date: Wed, 23 May 2012 00:31:18 -0400 Subject: [PATCH] I added a call to Collections.reverse() for mFragments in FeatureListFragment.onPause() This has fixed the issuse of the fragments reversing their order. The root cause is decribed here http://code.google.com/p/android/issues/detail?id=31116#makechanges Signed-off-by: Ricky Barrette --- .../LocationRinger/ui/fragments/FeatureListFragment.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/FeatureListFragment.java b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/FeatureListFragment.java index 0b59ee8..a42cc7a 100644 --- a/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/FeatureListFragment.java +++ b/LocationRinger/src/com/TwentyCodes/android/LocationRinger/ui/fragments/FeatureListFragment.java @@ -7,6 +7,7 @@ package com.TwentyCodes.android.LocationRinger.ui.fragments; import java.util.ArrayList; +import java.util.Collections; import android.content.ContentValues; import android.os.Bundle; @@ -74,7 +75,6 @@ public class FeatureListFragment extends Fragment { /** * (non-Javadoc) - * * @see android.support.v4.app.ListFragment#onCreateView(android.view.LayoutInflater, * android.view.ViewGroup, android.os.Bundle) */ @@ -94,9 +94,14 @@ public class FeatureListFragment extends Fragment { transaction.remove(fragment); } transaction.commit(); + Collections.reverse(this.mFragments); super.onPause(); } + /** + * (non-Javadoc) + * @see android.support.v4.app.Fragment#onResume() + */ @Override public void onResume() { if (Debug.DEBUG)