【发布时间】:2020-03-03 19:59:22
【问题描述】:
我试图制作一个弯曲的折叠工具栏,但没有覆盖我的内容的白色角落,我已经成功创建了视图,但即使将 AppBarLayout 背景设置为透明也没有给我透明的边缘
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/appBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/shape_curved_top"
app:elevation="0dp">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar_home_toolbar"
android:layout_width="match_parent"
android:layout_height="100dp"
app:layout_collapseMode="pin">
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
【问题讨论】:
标签: android toolbar android-collapsingtoolbarlayout