How to add a drop shadow to a Rectangular Shape in Android

4.1k views Asked by At

I am developing an Android App in which I need to use a Rectangular shape which should have a drop_shadow. I have designed a rectangular shape but somehow i am not able to add a drop shadow to it on (right and left sides). P.S.: this rectangular shape is added as a background attribute.

If this type of Question is already been answered then please provide the links here.

THANK YOU IN ADVANCE!!!!

enter image description here

Code:

    <?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#ffffff" />
    <stroke
        android:width="1dp"
        android:color="#000000" />
    <corners
        android:radius="10dp"   >
    </corners>

</shape>
0

There are 0 answers