最佳答案
好吧,我只是做了我们讨论的事情,我没有看到任何影子。我正在使用 AS 3.1.3。请参阅下面的代码。该按钮有一些阴影,但它不受海拔高度的影响,所以我想它只是其背景的 9 补丁或其他任何东西的一部分。我在问题跟踪器中没有看到任何当前问题。
https://issuetracker.google.com/issues?q=shadow%20design
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/carbon_white"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:background="@color/carbon_white"
android:elevation="8dp"
android:text="test"/>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="56dp"
android:layout_margin="16dp"
android:background="@color/carbon_white"
android:elevation="8dp"
/>
<Button
android:id="@+id/button5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:elevation="8dp"
android:text="Button"/>
</LinearLayout>
关于android - 布局高程属性不适用于 android studio 设计预览,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51126448/