Android 5.0 android: высота работает для просмотра, но не кнопка?

В образцах Android 5.0 из SDK Manager естьElevationBasic образец. Показывает дваView объекты: круг и квадрат. Круг имеетandroid:elevation установлен в30dp:

<?xml version="1.0" encoding="utf-8"?>
<!--
 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.
-->

<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">
    <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"/>
    <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"/>
</FrameLayout>

На Nexus 9, запустив образец как есть, мы получаем тень на круге:

Если мы изменим класс виджета наButtonоставляя все остальные атрибуты как есть, мы теряем тень на круге:

Вопросы:

Почемуandroid:elevation поведение меняется? Это не может быть связано с фоном, потому что в обоих случаях это один и тот же фон.

Какие классы поддерживаютandroid:elevationа чего нет? Например, используяTextView вместоView или жеButton до сих пор дает нам тень, так что это изменение в поведении не вводится наTextView уровень, а точнее наButton уровень.

Как видно вэтот вопрос со вчерашнего дня, как мы получаемandroid:elevation быть удостоенным чести наButton? Есть ли некоторыеandroid:allowElevationToWorkAsDocumented="true" значение, которое мы должны положить в тему или что-то?

Ответы на вопрос(5)

Ваш ответ на вопрос