title: Android 5.0 android:elevation Works for View, but not Button?
body: <p>In the Android 5.0 samples from the SDK Manager, there is the <code>ElevationBasic</code> sample. It shows two <code>View</code> objects: a circle and a square. The circle has <code>android:elevation</code> set to <code>30dp</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;!--
   Copyright 2014 The Android Open Source Project
  
   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at
  
       http://www.apache.org/licenses/LICENSE-2.0
  
   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
  --&gt;
  
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
               xmlns:tools="http://schemas.android.com/tools"
               android:layout_width="match_parent"
               android:layout_height="match_parent"&gt;
      &lt;View
              android:id="@+id/floating_shape"
              android:layout_width="80dp"
              android:layout_height="80dp"
              android:layout_marginRight="40dp"
              android:background="@drawable/shape"
              android:elevation="30dp"
              android:layout_gravity="center"/&gt;
      &lt;View
              android:id="@+id/floating_shape_2"
              android:layout_width="80dp"
              android:layout_height="80dp"
              android:layout_marginLeft="25dp"
              android:background="@drawable/shape2"
              android:layout_gravity="center"/&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>On a Nexus 9, running the sample as-is, we get a drop shadow on the circle:</p>
  
  <p><img src="https://i.stack.imgur.com/3pJaD.png" alt="ElevationBasic, As Originally Written"></p>
  
  <p>If we change the widget class to <code>Button</code>, leaving all other attributes as-is, we lose the drop shadow on the circle:</p>
  
  <p><img src="https://i.stack.imgur.com/gQv13.png" alt="ElevationBasic, Using a Button"></p>
  
  <p>The questions:</p>
  
  <ol>
  <li><p>Why is the <code>android:elevation</code> behavior changing? It cannot be due to the background, because it is the same background in both cases.</p></li>
  <li><p>Which classes support <code>android:elevation</code>, and which do not? For example, using <code>TextView</code> instead of <code>View</code> or <code>Button</code> still gives us the drop shadow, so this change in behavior is not introduced at the <code>TextView</code> level, but rather at the <code>Button</code> level.</p></li>
  <li><p>As seen in <a href="https://stackoverflow.com/questions/27070436/android-l-raised-normal-button">this question</a> from yesterday, how do we get <code>android:elevation</code> to be honored on a <code>Button</code>? Is there some <code>android:allowElevationToWorkAsDocumented="true"</code> value that we have to put in a theme or something?</p></li>
  </ol>