@@ -824,9 +824,16 @@ class MainFileListFragment : Fragment(),
824
824
} else if (! currentFolder.hasAddSubdirectoriesPermission) {
825
825
binding.fabMkdir.isVisible = false
826
826
}
827
+ registerFabMainListener()
827
828
registerFabUploadListener()
828
829
registerFabMkDirListener()
829
830
registerFabNewShortcutListener()
831
+ binding.apply {
832
+ fabUpload.isFocusable = false
833
+ fabMkdir.isFocusable = false
834
+ fabNewfile.isFocusable = false
835
+ fabNewshortcut.isFocusable = false
836
+ }
830
837
}
831
838
}
832
839
@@ -844,6 +851,18 @@ class MainFileListFragment : Fragment(),
844
851
binding.fabMkdir.isVisible = shouldBeShown
845
852
}
846
853
854
+ private fun registerFabMainListener () {
855
+ binding.apply {
856
+ fabMain.findViewById<View >(R .id.fab_expand_menu_button).setOnClickListener {
857
+ fabMain.toggle()
858
+ fabUpload.isFocusable = isFabExpanded()
859
+ fabMkdir.isFocusable = isFabExpanded()
860
+ fabNewfile.isFocusable = isFabExpanded()
861
+ fabNewshortcut.isFocusable = isFabExpanded()
862
+ }
863
+ }
864
+ }
865
+
847
866
/* *
848
867
* Registers [android.view.View.OnClickListener] on the 'Upload' mini FAB for the linked action.
849
868
*/
@@ -887,7 +906,14 @@ class MainFileListFragment : Fragment(),
887
906
}
888
907
889
908
fun collapseFab () {
890
- binding.fabMain.collapse()
909
+ binding.apply {
910
+ fabMain.collapse()
911
+ fabUpload.isFocusable = false
912
+ fabMkdir.isFocusable = false
913
+ fabNewfile.isFocusable = false
914
+ fabNewshortcut.isFocusable = false
915
+ }
916
+
891
917
}
892
918
893
919
fun isFabExpanded () = binding.fabMain.isExpanded
@@ -1323,6 +1349,8 @@ class MainFileListFragment : Fragment(),
1323
1349
setDrawerStatus(enabled = false )
1324
1350
actionMode = mode
1325
1351
1352
+ requireActivity().findViewById<View >(R .id.owncloud_app_bar).isFocusableInTouchMode = false
1353
+
1326
1354
val inflater = requireActivity().menuInflater
1327
1355
inflater.inflate(R .menu.file_actions_menu, menu)
1328
1356
this @MainFileListFragment.menu = menu
@@ -1395,6 +1423,8 @@ class MainFileListFragment : Fragment(),
1395
1423
setDrawerStatus(enabled = true )
1396
1424
actionMode = null
1397
1425
1426
+ requireActivity().findViewById<View >(R .id.owncloud_app_bar).isFocusableInTouchMode = true
1427
+
1398
1428
// reset to previous color
1399
1429
requireActivity().window.statusBarColor = statusBarColor!!
1400
1430
0 commit comments