[Android] Fix IllegalStateException

Nicolas Pomepuy git at videolan.org
Wed Jun 17 07:53:20 CEST 2020


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Wed Jun 17 07:53:20 2020 +0200| [b201ef0dc9a4fe66c50199b336262f1f60b66951] | committer: Nicolas Pomepuy

Fix IllegalStateException

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

 .../org/videolan/vlc/gui/helpers/BottomNavigationBehavior.kt | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/helpers/BottomNavigationBehavior.kt b/application/vlc-android/src/org/videolan/vlc/gui/helpers/BottomNavigationBehavior.kt
index 5902dbd93..d0fe4ff6a 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/helpers/BottomNavigationBehavior.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/helpers/BottomNavigationBehavior.kt
@@ -29,6 +29,7 @@ import android.content.Context
 import android.os.Parcel
 import android.os.Parcelable
 import android.util.AttributeSet
+import android.util.Log
 import android.view.Gravity
 import android.view.View
 import android.view.ViewGroup
@@ -39,6 +40,7 @@ import androidx.core.animation.addListener
 import androidx.customview.view.AbsSavedState
 import com.google.android.material.bottomsheet.BottomSheetBehavior
 import com.google.android.material.snackbar.Snackbar
+import org.videolan.vlc.BuildConfig
 import org.videolan.vlc.R
 
 private const val ENTER_ANIMATION_DURATION = 225L
@@ -235,4 +237,14 @@ class BottomNavigationBehaviorState : AbsSavedState {
         super.writeToParcel(out, flags)
         out.writeFloat(translation)
     }
+
+    companion object CREATOR : Parcelable.Creator<BottomNavigationBehaviorState> {
+        override fun createFromParcel(parcel: Parcel): BottomNavigationBehaviorState {
+            return BottomNavigationBehaviorState(parcel)
+        }
+
+        override fun newArray(size: Int): Array<BottomNavigationBehaviorState?> {
+            return arrayOfNulls(size)
+        }
+    }
 }
\ No newline at end of file



More information about the Android mailing list