Pregunta

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

¿Fue útil?

Solución 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.

Otros consejos

You can checkout the shadow drawable in Google IO 2014 App

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top