question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

v6.1 no longer works with CoordinatorLayout, must be a FrameLayout now

See original GitHub issue

Prior to v6.x, I was using a CoordinatorLayout as the view for the snackbar since I have a FAB that I would like to respond to a snackbar being shown. Upon updating, I’ve had to use FrameLayout to avoid a crash.

I’ve also tried to access snackProgressBarLayout.setViewsToMove$lib_release(View[]);, but it has no effect when getting the FAB view.

This is my error: ClassCastException: androidx.coordinatorlayout.widget.CoordinatorLayout$LayoutParams cannot be cast to android.widget.FrameLayout$LayoutParams

Occurs here:

snackProgressBarManager = new SnackProgressBarManager(coordinatorLayout, this)

The error is fixed when I change the coordinatorLayout to a FrameLayout, but the FAB no longer moves along with it. I’ve tried making a CoordinatorLayout the parent of the FrameLayout, but the same error results. I’ve tried android:animateLayoutChanges="true", but I don’t think that has any effect on a FrameLayout.

You’ve done a tremendous job with 6.0+, loving the new behavior to .updateTo and the public SnackProgressBarLayout, as well as Lifecycle management.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
tingyik90commented, May 12, 2019

Great! Might be a good time to test now. I’ll publish this as new release soon. Pending another issue to be closed. I’ll let you know when a new version is available.

1reaction
starsepcommented, Jul 30, 2019

Hi, any chance for release with the fix? I confirm that implementation 'com.github.tingyik90:snackprogressbar:c4a1fb7467' fixes the issue for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

android - CoordinatorLayout with Framelayout is no working
I use tabLayout with three tabs in viewPager , i want to use CoordinatorLayout to hide and show my toolbar when scrolling. It's...
Read more >
CoordinatorLayout in design support library does not update ...
Hello, I am defining CoordinatorLayout in my application like this. ... It works out-of-the box, even after rotating, but if i rotate my...
Read more >
CoordinatorLayout | Android Developers
CoordinatorLayout is a super-powered FrameLayout . CoordinatorLayout is intended for two primary use cases: As a top-level application decor or chrome ...
Read more >
Campfire: Today, August 18 - CommonsWare
use a FrameLayout as the container for the fragment, if it's a dynamic fragment. Kait. I want a CoordinatorLayout to make the FAB...
Read more >
Using Coordinator Layout in Android - MindOrks
Also, it is advised not to use more than one element in our FrameLayout. The reason behind this is, you have to explicitly...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found