Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Android shadow drawable xml.
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<!-- Drop Shadow Stack -->
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp" />
<solid android:color="#00CCCCCC" />
<corners android:radius="3dp" />
</shape>
</item>
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp" />
<solid android:color="#10CCCCCC" />
<corners android:radius="3dp" />
</shape>
</item>
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp" />
<solid android:color="#20CCCCCC" />
<corners android:radius="3dp" />
</shape>
</item>
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp" />
<solid android:color="#30CCCCCC" />
<corners android:radius="3dp" />
</shape>
</item>
<item>
<shape>
<padding
android:bottom="1dp"
android:left="1dp"
android:right="1dp"
android:top="1dp" />
<solid android:color="#50CCCCCC" />
<corners android:radius="3dp" />
</shape>
</item>
<!-- Background -->
<item>
<shape>
<solid android:color="@android:color/white" />
<corners android:radius="3dp" />
</shape>
</item>
</layer-list>
@isamercan
Copy link

isamercan commented Jul 31, 2017

thanks :)

@ozmium
Copy link

ozmium commented Aug 23, 2017

@Fatimamostafa
Copy link

Fatimamostafa commented Dec 28, 2017

How can I make this a smooth shadow? It's somewhat pixelated in view.

@JangChanSig
Copy link

JangChanSig commented Feb 23, 2018

thank you so so so much. it perfect shadow button i have been looking for

@auyanik
Copy link

auyanik commented Apr 19, 2018

thank you so muchhhhh. perfect

@RahulSDeshpande
Copy link

RahulSDeshpande commented Apr 20, 2018

Sorry, I think this is not at all the solution, its just the workaround.

@pradeep2424
Copy link

pradeep2424 commented Jul 30, 2018

thanks.. exactly what i was looking ;-)

@limkokhole
Copy link

limkokhole commented Sep 14, 2018

This is the only solutions work as desired after I google for few hours, thanks.

@DanielyBotelho
Copy link

DanielyBotelho commented Nov 13, 2018

thanks!

@Joe-Mobarak-WoLf
Copy link

Joe-Mobarak-WoLf commented Jan 30, 2019

Sweet

@ayebmehdi2
Copy link

ayebmehdi2 commented Feb 5, 2019

thannnk you

@tusharpandey
Copy link

tusharpandey commented May 14, 2019

Yoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo big thank you .

@phamthelong
Copy link

phamthelong commented May 15, 2019

thanks you

@DaeJunLee
Copy link

DaeJunLee commented Jun 12, 2019

Thank you..

@huuphudn2017
Copy link

huuphudn2017 commented Aug 26, 2019

Thanks youuuu ^^

@johngorithm
Copy link

johngorithm commented Sep 15, 2019

Thanks 🙏🏻

@debbebicomjm
Copy link

debbebicomjm commented Nov 25, 2019

Thanksssss ^^^

@gabriel-TheCode
Copy link

gabriel-TheCode commented Dec 31, 2019

Thank you very much !

@JainamSB
Copy link

JainamSB commented Jan 2, 2020

thanksssssssssssssss

@iikimamhambali
Copy link

iikimamhambali commented Apr 9, 2020

Cool man, Thank you

@MoonHyekyung
Copy link

MoonHyekyung commented Apr 11, 2020

Thank you!!!

@vanjoe667
Copy link

vanjoe667 commented Jun 18, 2020

wow, you a life save man, thanks a million

@tachyondev
Copy link

tachyondev commented Jun 20, 2020

Thanks!

@Ediro43
Copy link

Ediro43 commented Jul 21, 2020

Thank you very much! I have been trying to make a shadow shape for more than two hours.

@kranthi-chandra
Copy link

kranthi-chandra commented Sep 16, 2020

perfect! finally found, thank you!

@santiihoyos
Copy link

santiihoyos commented Oct 1, 2020

✌🏻👌🏻🥳
Cuando vengas a España te invito a una caña jajaja

@thang-uit
Copy link

thang-uit commented May 8, 2021

Thank you, bro! This code helps my project a lot!

@mussacharles60
Copy link

mussacharles60 commented Apr 8, 2022

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment