0

I can't find out what is the white background behind the CardView corners. I tried to set the activity background to transparent but it didn't work. This is the bottomSheetFragment parent layout:

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

I also tried to add this style to the cardView and it didn't work

 <style name="MyCardViewStyle" parent="Widget.MaterialComponents.CardView">
        <item name="cardBackgroundColor">@android:color/transparent</item>
        <item name="android:background">@android:color/transparent</item>
    </style>

enter image description here

Doha
  • 325
  • 2
  • 13
  • what is the parent view? – Gabriele Mariotti Aug 08 '20 at 20:58
  • The cardView is the parent view in the bottomSheetFragment – Doha Aug 08 '20 at 21:21
  • 1
    Check also if there is a background color in the bottomSheetFragment. If you are looking for rounded corner you can do it in a different way: https://stackoverflow.com/questions/43852562/round-corner-for-bottomsheetdialogfragment/57627229#57627229 – Gabriele Mariotti Aug 08 '20 at 21:57
  • This is the xml for the bottomSheetFrag and the cardView is the parent layout and it has a transparent background – Doha Aug 09 '20 at 10:39

0 Answers0