java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.support.design.widget.CoordinatorLayout$LayoutParams

Stack Overflow | Daniel Loaiza | 5 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    How to solve ClassCastException for LinearLayout.LayoutParams vs CoordinatorLayout.LayoutParams

    Stack Overflow | 5 months ago | Daniel Loaiza
    java.lang.ClassCastException: android.widget.LinearLayout$LayoutParams cannot be cast to android.support.design.widget.CoordinatorLayout$LayoutParams

    Root Cause Analysis

    1. java.lang.ClassCastException

      android.widget.LinearLayout$LayoutParams cannot be cast to android.support.design.widget.CoordinatorLayout$LayoutParams

      at android.support.design.widget.FloatingActionButton$Behavior.isBottomSheet()
    2. android.support.design
      FloatingActionButton$Behavior.onDependentViewChanged
      1. android.support.design.widget.FloatingActionButton$Behavior.isBottomSheet(FloatingActionButton.java:597)
      2. android.support.design.widget.FloatingActionButton$Behavior.onDependentViewChanged(FloatingActionButton.java:589)
      3. android.support.design.widget.FloatingActionButton$Behavior.onDependentViewChanged(FloatingActionButton.java:528)
      3 frames