Please sign in to comment.
Always use FragmentTransaction.replace() instead of add().
This removes any existing fragments with the same ID. At least on Andoid Lollipop, I have sometimes seen two set of fragments, doubling the actoin icons and menu items. This was maybe happening when we checked for the existing fragment too soon after adding it, then adding another one when we didn't find it. This suggests an inefficiency, but until I find that, this is safer anyway.
- Loading branch information...
Showing with 8 additions and 8 deletions.
- +1 −1 app/src/main/java/com/murrayc/galaxyzoo/app/ClassifyActivity.java
- +2 −2 app/src/main/java/com/murrayc/galaxyzoo/app/ClassifyFragment.java
- +1 −1 app/src/main/java/com/murrayc/galaxyzoo/app/ExampleViewerActivity.java
- +1 −1 app/src/main/java/com/murrayc/galaxyzoo/app/QuestionHelpActivity.java
- +1 −1 app/src/main/java/com/murrayc/galaxyzoo/app/SubjectViewerActivity.java
- +2 −2 app/src/main/java/com/murrayc/galaxyzoo/app/SubjectViewerFragment.java