Open lpellegr opened 10 years ago
I've asked @PaulMaddox to provide a shadow image for xxxhdpi
. Regarding weird two circles I'll take a look.
Added shadow image for xxxhdpi
in 1e1b8d78d602c235f739ac5f0518627412b65bd.
It seems nobody knows what causes this bug. I posted a question http://stackoverflow.com/questions/26960939/elevation-transparency-bug-on-android-lollipop but got no answers.
Can it be an Android bug?
@makovkastar Is there still no solution for this problem? This could be a big problem on Android 5 devices as I'm also using a transparent background. I hope you will find a solution. Thank you.
@Iggy82 No, still no solution...
https://code.google.com/p/android/issues/detail?id=78248
Android bug seems to mention elevation not working correctly with translucent background. It might be related?
Hi, been running into this problem this morning. as far as I can tell, android draws a flat shadow gradient "border", then lays out content to straddle that gradient. looks great for solid color content, but transparencies allow you to see through that content and see the entire shadow gradient. i think a custom asset as makovkastar commented on Nov 8, 2014
is the only way to use transparent content with pseudo elevation.
Using a background color with some alpha (e.g.
#99fe0038
) when the shadow attribute value is set to true reveals two circles: one for the floating action button and another inside (cf. image below). The latter is probably caused by the shape of the drawable that is used for creating the shadow.It would be nice to get a circle without the inner one when a transparent background color is used.
I have also noticed that the image drawable used for the shadow isn't provided for
xxxhdpi
.