diff --git a/.gitignore b/.gitignore index 39fb081..f545b32 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /build /captures .externalNativeBuild +/.idea/ diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml deleted file mode 100644 index b0c26a8..0000000 --- a/.idea/codeStyleSettings.xml +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml deleted file mode 100644 index 09576fb..0000000 --- a/.idea/inspectionProfiles/Project_Default.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index 3b31283..0000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/markdown-navigator/profiles_settings.xml b/.idea/markdown-navigator/profiles_settings.xml new file mode 100644 index 0000000..57927c5 --- /dev/null +++ b/.idea/markdown-navigator/profiles_settings.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 5d19981..d400afb 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,6 +3,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/library/src/main/java/com/viven/fragmentstatemanager/FragmentStateManager.java b/library/src/main/java/com/viven/fragmentstatemanager/FragmentStateManager.java index 69ecccb..f6a64e7 100644 --- a/library/src/main/java/com/viven/fragmentstatemanager/FragmentStateManager.java +++ b/library/src/main/java/com/viven/fragmentstatemanager/FragmentStateManager.java @@ -42,13 +42,13 @@ public Fragment changeFragment(int position) { fragment = getItem(position); fragmentTransaction.add(container.getId(), fragment, tag); } else { - fragmentTransaction.attach(fragment); + fragmentTransaction.show(fragment); } // Detach existing primary fragment Fragment curFrag = mFragmentManager.getPrimaryNavigationFragment(); if (curFrag != null) { - fragmentTransaction.detach(curFrag); + fragmentTransaction.hide(curFrag); } // Set fragment as primary navigator for child manager back stack to be handled by system