Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to use FAB Speed Dial in a Coordinator Layout #32

Closed
mezpahlan opened this issue Oct 18, 2016 · 3 comments
Closed

Error when trying to use FAB Speed Dial in a Coordinator Layout #32

mezpahlan opened this issue Oct 18, 2016 · 3 comments

Comments

@mezpahlan
Copy link

I'm getting the following error when trying to use FAB Speed Dial in a Coordinator Layout

Default behavior class io.github.yavski.fabspeeddial.FabSpeedDialBehaviour could not be instantiated. Did you forget a default constructor?
java.lang.InstantiationException: class io.github.yavski.fabspeeddial.FabSpeedDialBehaviour has no zero argument constructor

Possibly related to #29 ?

I've added the following to FabSpeedDialBehaviour.javaand it seems to fix this.

public FabSpeedDialBehaviour() { }

Do you need a PR for this? Happy to provide one if so.

@mezpahlan
Copy link
Author

Also solves #11 for me too!

@yavski
Copy link
Owner

yavski commented Oct 19, 2016

@mezpahlan Thanks for reporting it - how do you reproduce it? Yes it seems to be a regression from #29, I will add back the no-arg constructor tonight.

@mezpahlan
Copy link
Author

mezpahlan commented Oct 19, 2016

@yavski No worries.

Steps to reprodcue for #11 :

  1. Follow set up instructions for library
  2. Place FAB-Speed-Dial inside coordinator layout

Expected result:

Preview is rendered without errors

Actual result:

Error message appears in preview mode (although app works fine when running)

Steps to reproduce for #32 (this one):

  1. Follow set up instructions for library
  2. Place FAB-Speed-Dial inside coordinator layout
  3. Run app up in emulator (debug mode for app). I used a Nexus 5X emulator preset from Android Studio, no special tweaks running API 22...... but I don't think that matters.
  4. Observe Logcat output messages

Expected result:

No error messages in Logcat output window

Actual result:

Error message in Logcat output window relating to missing default constructor.

Simply adding it back in gives me the desired result (i.e. no errors in preview mode and no Logcat errors). However, I just wanted to be sure that was absolutely the correct thing to do.

Anyways, good luck! Great library BTW.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants