[Android] Fix TypecastException
Nicolas Pomepuy
git at videolan.org
Tue Dec 10 11:51:19 CET 2019
vlc-android | branch: master | Nicolas Pomepuy <nicolas.pomepuy at gmail.com> | Tue Dec 10 11:45:54 2019 +0100| [0376ea691229a259ff7793d18787dcdd8d0d9446] | committer: Nicolas Pomepuy
Fix TypecastException
> https://code.videolan.org/videolan/vlc-android/commit/0376ea691229a259ff7793d18787dcdd8d0d9446
---
.../src/org/videolan/vlc/gui/dialogs/VLCBottomSheetDialogFragment.kt | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/dialogs/VLCBottomSheetDialogFragment.kt b/vlc-android/src/org/videolan/vlc/gui/dialogs/VLCBottomSheetDialogFragment.kt
index da5b37ff7..94f53d569 100644
--- a/vlc-android/src/org/videolan/vlc/gui/dialogs/VLCBottomSheetDialogFragment.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/dialogs/VLCBottomSheetDialogFragment.kt
@@ -10,7 +10,6 @@ import android.widget.FrameLayout
import androidx.annotation.LayoutRes
import androidx.lifecycle.lifecycleScope
import com.google.android.material.bottomsheet.BottomSheetBehavior
-import com.google.android.material.bottomsheet.BottomSheetDialog
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
import org.videolan.vlc.R
import org.videolan.vlc.util.Settings
@@ -35,7 +34,7 @@ abstract class VLCBottomSheetDialogFragment : BottomSheetDialogFragment() {
super.onViewCreated(view, savedInstanceState)
lifecycleScope.launchWhenStarted {
dialog?.window?.setLayout(resources.getDimensionPixelSize(R.dimen.default_context_width), ViewGroup.LayoutParams.MATCH_PARENT)
- (dialog as BottomSheetDialog).findViewById<FrameLayout>(com.google.android.material.R.id.design_bottom_sheet)?.let {
+ dialog?.findViewById<FrameLayout>(com.google.android.material.R.id.design_bottom_sheet)?.let {
val bsb = BottomSheetBehavior.from(it)
if (bsb.state == BottomSheetBehavior.STATE_COLLAPSED) bsb.state = getDefaultState()
}
More information about the Android
mailing list