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

Readme.md usage example causes Unsupported Operation Exception #1

Closed
ameron32 opened this issue Apr 16, 2015 · 1 comment
Closed

Readme.md usage example causes Unsupported Operation Exception #1

ameron32 opened this issue Apr 16, 2015 · 1 comment

Comments

@ameron32
Copy link

In usage example, this line of XML code causes the mentioned exception:

tb:tb_animation_duration="500"

when converted to the following due to attribute name mismatch
tb:tb_anim_duration="500"
causes the following exception
java.lang.UnsupportedOperationException: Can't convert to integer: type=0x4
at android.content.res.TypedArray.getInteger(TypedArray.java:367)
at com.github.alexkolpa.fabtoolbar.FabToolbar.loadAttributes(FabToolbar.java:67)

Added to build.gradle as follows:

dependencies {
...
compile 'com.github.alexkolpa:floating-action-button-toolbar:0.5.0'
...
}

In library:
attrs.xml appears to define tb_anim_duration as float.
in FabToolbar.java, TypedArray.getInteger() is called.

Suggested fix:
please change attrs.xml > tb_anim_duration to "integer"

@AlexKolpa
Copy link
Owner

Can't believe I missed that one! Thanks for reporting. I've uploaded a new version to maven which should be available soon!

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