From 12a06d6973107dd3fc5168ca4c95e64e53ab7b8d Mon Sep 17 00:00:00 2001 From: Po10cio Date: Tue, 19 Sep 2017 17:06:11 +0100 Subject: [PATCH 1/2] fix : chanage tranaction type from attach|detach to show|hide --- .idea/codeStyleSettings.xml | 228 ------------------ .idea/inspectionProfiles/Project_Default.xml | 11 - .../inspectionProfiles/profiles_settings.xml | 7 - .../markdown-navigator/profiles_settings.xml | 3 + .idea/misc.xml | 71 +++++- .idea/vcs.xml | 6 + .../FragmentStateManager.java | 4 +- 7 files changed, 81 insertions(+), 249 deletions(-) delete mode 100644 .idea/codeStyleSettings.xml delete mode 100644 .idea/inspectionProfiles/Project_Default.xml delete mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/markdown-navigator/profiles_settings.xml create mode 100644 .idea/vcs.xml 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 From a40645e79cd68a0a250e9bc026d8f2fdf0c66c46 Mon Sep 17 00:00:00 2001 From: Po10cio Date: Tue, 19 Sep 2017 17:13:14 +0100 Subject: [PATCH 2/2] add .idea to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 39fb081..f545b32 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /build /captures .externalNativeBuild +/.idea/