-
Notifications
You must be signed in to change notification settings - Fork 140
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
Exception android.widget.ImageView cannot be cast to android.support.v7.widget.AppCompatImageView #53
Comments
Hey @alexdrottsgard |
Yeah I have.. |
This shows a missing library if you read the error message carefully. |
Yeah sorry! I have a Google Map Activity, on which I put your FAB. I've made the menu xml and I put it programmatically in my MapsActivity. My layout is a FrameLayout, which has the map fragment and the FAB. How I make my menu item: <item
android:id="@+id/first_item"
android:icon="@drawable/my_image"
android:title="First Item" /> I have also tried to do: <item
android:id="@+id/first_item"
app:srcCompat="@drawable/my_image"
android:title="First Item" /> My onCreate, where I put the menu to the FAB: fabOptions = findViewById(R.id.fab);
fabOptions.setButtonsMenu(R.menu.fab_menu); Version in my gradle: implementation 'com.github.joaquimley:faboptions:1.2.0' |
Can you provide the list of your other dependencies? |
@alexdrottsgard I think issue is here:
you are using srcCompat and this is causing the issue in Casting from normal image to srcCompat image |
Oh I haven't tested with |
I've been trying to implement your Floating Action Button. I've followed the instructions you've made. When I try to run my app I get: Caused by: java.lang.ClassCastException: android.widget.ImageView cannot be cast to android.support.v7.widget.AppCompatImageView
I'm not sure if it's something on my side, or on the main source code. The error is pointing at line 52 in your FabOptionsContainer.
Thanks in advance!
The text was updated successfully, but these errors were encountered: