Closed maniac103 closed 9 years ago
Thanks for this report. I will fix it soon.
I would be even better if the library provided the correct ViewOutlineProvider for that case as well :)
About this, I tried to disable the gradient shadow and apply an android:elevation, however on my Android 5 device the cast shadow doesn't show up. Any idea? Something about this outline provider?
Without outline provider there should be a rectangular shadow around the button, no shadow at all sounds like a different thing though. Does your app you're testing this in target API 21?
Yes it's targeting API 21 and I have other android:elevation on the same layout which are working properly. Did you try something similar on your side at any point?
2014-11-26 7:37 GMT+01:00 maniac103 notifications@github.com:
Without outline provider there should be a rectangular shadow around the button, no shadow at all sounds like a different thing though. Does your app you're testing this in target API 21?
— Reply to this email directly or view it on GitHub https://github.com/shamanland/floating-action-button/issues/10#issuecomment-64521114 .
Nope, I didn't yet. After reading the code ([1]), it comes down to theme and/or drawable attributes, though:
I'm not sure whether the FAB's background provides an outline, so it's probably better to provide a custom one, which matches what AOSP apps are doing (e.g. [2], line 163)
[1] https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/view/View.java [2] https://android.googlesource.com/platform/packages/apps/DeskClock/+/master/src/com/android/deskclock/DeskClock.java
Seems to work just great :) I've made a PR #11
Fixed and published with version 0.0.6
- available on Maven Central.
As mentioned in the title, one should be able to disable the shadow by an XML bool attribute. Use case is to use real shadows on API 21 by utilizing android:elevation instead of the shadow drawable.