Search code examples
androidshadow

shadow to layout by 100% radius


I want add shadow to layouts like below image :

http://s9.picofile.com/file/8321463292/android.png

I do not want use android:elevation, because not working for android 4.3

Also, I use these libraries but not work correct for me :

https://github.com/loopeer/shadow
https://github.com/dmytrodanylyk/shadow-layout
https://github.com/Devlight/ShadowLayout
https://github.com/harjot-oberai/MaterialShadows
https://github.com/xuehuayous/Android-ShadowView

How i can set shadow to layouts like top image ? ( smooth, 100% radius and colorful)

Thank you


Solution

  • I have two suggestions to make shadow as per your requirement

    you can use 9-patch image, may be this link will help you to create 9-patch with shadow

    alternate

    solution is to make gradient and set background to your button view.