Вопрос

Is there a way to add a drop shadow to a FrameLayout programmatically without the use of an additional XML file?

If yes please can you provide me a solution?

Something like that:

enter image description here

Это было полезно?

Решение 2

I fixed my problem by creating a gradient color on Photoshop, then creating views that has this color as background. On transitions, I change the X,Y,width,height properly :)

Edit 2019:

The simple solution now is add some elevation to the FrameLayout.

Другие советы

You can checkout the shadow drawable in Google IO 2014 App

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top