我无法找出CardView
角落后面的白色背景是什么。我试图将活动背景设置为透明,但没有奏效。这是bottomSheetFragment
父布局:
<com.google.android.material.card.MaterialCardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cardCornerRadius="50dp"
app:cardElevation="0dp"
app:cardBackgroundColor="@color/colorGreyHint"
tools:context=".ui.fragment.HelpBottomSheetFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
cardView
我也尝试将此样式添加到
<style name="MyCardViewStyle" parent="Widget.MaterialComponents.CardView">
<item name="cardBackgroundColor">@android:color/transparent</item>
<item name="android:background">@android:color/transparent</item>
</style>