Elevation 在 ConstraintLayout 中不起作用,按钮始终显示在全屏进度的前面...... 这是一个示例代码,原始代码要大得多所以请不要建议使用 FrameLayout。 ^^ 谢谢
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.AppCompatButton
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="0dp"
android:text="Update"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.89" />
<include
android:id="@+id/full_screen_progress"
layout="@layout/layout_progressbar_fullscreen"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:elevation="20dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
我也试过在ConstraintLayout中移动不同位置的元素但是没有结果