浏览代码

Merge pull request #3997 from nextcloud/noFABonSearch

show fab when navigating into a search
Andy Scherzinger 6 年之前
父节点
当前提交
06a8a44494
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java

+ 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());