Przeglądaj źródła

Merge pull request #3997 from nextcloud/noFABonSearch

show fab when navigating into a search
Andy Scherzinger 6 lat temu
rodzic
commit
06a8a44494

+ 9 - 0
src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java

@@ -882,6 +882,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
                         } else {
                             // update state and view of this fragment
                             searchFragment = false;
+                            mHideFab = false;
 
                             if (mContainerActivity instanceof FolderPickerActivity &&
                                     ((FolderPickerActivity) mContainerActivity)
@@ -900,6 +901,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
                     } else {
                         // update state and view of this fragment
                         searchFragment = false;
+                        mHideFab = false;
                         listDirectory(file, MainApp.isOnlyOnDevice(), false);
                         // then, notify parent activity to let it update its state and view
                         mContainerActivity.onBrowsedDownTo(file);
@@ -1211,6 +1213,13 @@ public class OCFileListFragment extends ExtendedListFragment implements
             switchToListView();
         }
 
+        if (mHideFab) {
+            setFabVisible(false);
+        } else {
+            setFabVisible(true);
+            registerFabListener();
+        }
+
         // FAB
         setFabEnabled(mFile.canWrite());