[Android] Fix IllegalStateException

Nicolas Pomepuy git at videolan.org
Fri Aug 7 09:11:18 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Fri Aug  7 06:17:55 2020 +0200| [0a39f06921abd8ac720b54b9b706c50bc6445288] | committer: Nicolas Pomepuy

Fix IllegalStateException

> https://code.videolan.org/videolan/vlc-android/commit/0a39f06921abd8ac720b54b9b706c50bc6445288
---

 application/vlc-android/src/org/videolan/vlc/gui/BaseFragment.kt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/BaseFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/BaseFragment.kt
index ae64f7892..1214d3c30 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/BaseFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/BaseFragment.kt
@@ -50,8 +50,8 @@ abstract class BaseFragment : Fragment(), ActionMode.Callback {
             swipeRefreshLayout = it
             it.setColorSchemeResources(R.color.orange700)
         }
-        val fab = requireActivity().findViewById<FloatingActionButton>(R.id.fab)
-        ((fab.layoutParams as? CoordinatorLayout.LayoutParams)?.behavior as? FloatingActionButtonBehavior)?.shouldNeverShow = !hasFAB()
+        val fab = requireActivity().findViewById<FloatingActionButton?>(R.id.fab)
+        ((fab?.layoutParams as? CoordinatorLayout.LayoutParams)?.behavior as? FloatingActionButtonBehavior)?.shouldNeverShow = !hasFAB()
         if (hasFAB()) fabPlay = fab
     }
 



More information about the Android mailing list