summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2015-02-16 22:22:37 -0800
committerKeith Packard <keithp@keithp.com>2015-02-16 22:22:37 -0800
commit106b16b4d5d024543d7ad8c4b4762151e253f3c4 (patch)
tree6e2a29e8eeddc512a64122d8231444fc7556fb25
parente6630ac41ca0d8563cf9a0df5d4acba8192e9624 (diff)
altosdroid: Ignore automatic tab changing while activity is saved
When the activity state is saved (after onSaveInstanceState()), we can't update the UI until the activity is restarted or restored; that means any UI changes we make, like switching tabs, must deal with this by allowing those changes to be ignored, using commitAllowingStateLoss instead of commit. Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java
index f61e7ef2..0896b3a3 100644
--- a/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java
+++ b/altosdroid/src/org/altusmetrum/AltosDroid/AltosDroidTab.java
@@ -64,7 +64,7 @@ public abstract class AltosDroidTab extends Fragment implements AltosUnitsListen
ft.show(this);
} else
ft.hide(this);
- ft.commit();
+ ft.commitAllowingStateLoss();
}
public void update_ui(AltosState state, AltosGreatCircle from_receiver, Location receiver, boolean is_current) {