Question: [Material design](http://www.google.com/design/spec/material-design/introduction.html#introduction-principles) makes a huge emphasis on the metaphor of "sheets of paper". To make these, shadows are essential. Since Material design is a philosophy and **not an API** (despite it being built into L), this should be done anywhere (Windows Forms, HTML/CSS, etc.). **How do I do this in Android API 14 to 20?**

Note that premade PNGs won't really be that practical for circular and other non-square shapes.

Answer: 
If you're not worried about backwards compatibility past Lollipop, you can set the elevation Attribute directly in the XML

```
    android:elevation="10dp"

```

Otherwise you have to set it in Java using the support.v4.ViewCompat library.

```
    ViewCompat.setElevation(myView, 10);

```

and add this to your build.gradle

```
    compile 'com.android.support:support-v4:21.+'

```

<http://developer.android.com/reference/android/support/v4/view/ViewCompat.html#setElevation(android.view.View,%20float)>
You can use android.support.v7.widget.CardView.

Maybe is not the perfect solution but for me is working on what I want. So, for example this is the trick I use on my app ... on an rectangular shape and I am pleased of the result.

```
private View.OnTouchListener touch = new View.OnTouchListener() {

    @Override
    public boolean onTouch(View v, MotionEvent event) {

        final android.support.v7.widget.CardView card_view = (android.support.v7.widget.CardView) ((View) v.getParent()).findViewById(R.id.card_view);

        switch (event.getAction()) {

            case MotionEvent.ACTION_DOWN:

                card_view.setCardElevation(6);
                card_view.setScaleX(1.007f);
                card_view.setScaleY(1.007f);
                break;
            case MotionEvent.ACTION_CANCEL:
            case MotionEvent.ACTION_UP:

                card_view.setCardElevation(3);
                card_view.setScaleX(1f);
                card_view.setScaleY(1f);
                break;
        }
        return false;
    }
};

```

In xml file I use:

```
<android.support.v7.widget.CardView
xmlns:card_view="http://schemas.android.com/apk/res-auto"

android:id="@+id/card_view"
android:layout_width="match_parent"
android:layout_height="match_parent"

card_view:cardCornerRadius="2dp"
card_view:cardMaxElevation="6dp"
card_view:cardElevation="3dp">

```