[BottomSheetDialog] android:colorBackground stopped working with version 1.2.0
See original GitHub issueDescription:
Starting with version 1.2.0 the android:colorBackground
attribute is ignored and the bottom sheet dialog always has a white background set.
Expected behavior:
android:colorBackground
should set the background color of the sheet as with version 1.1.0.
Source code:
<style name="ShoppingList.BottomSheetDialog" parent="Theme.MaterialComponents.Light.BottomSheetDialog">
<item name="android:colorBackground">@android:color/transparent</item> <!-- has no effect -->
<item name="android:backgroundDimAmount">0.3</item>
</style>
Android API version: 29
Material Library version: 1.2.0
Device: Google Pixel
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
android - BottomSheetDialog with transparent background
This is a version of DialogFragment that shows a bottom sheet using BottomSheetDialog instead of a floating dialog. This means there should be...
Read more >Migrating to Material Components for Android
Let's understand these issues by going through some common migration scenarios. Text field changes. The default style for text fields has ...
Read more >Bottomsheetdialog With Transparent Background - ADocLib
[BottomSheetDialog] android:colorBackground stopped working with version Source code: Now the BottomSheet's background is transparent, however it still With ...
Read more >BottomSheetDialog not working [37083487] - Issue Tracker
I tried to use BottomSheetDialog introduced in Android Support Library 23.2 but it doesn't seem to work correctly. Here is what the doc...
Read more >Make your BottomSheetDialog noncancelable - beta - Medium
Update: I wrote a standalone library for solving this issue. You can check it out at https://github.com/beta/android-lockable-bottom-sheet.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can use something like:
with:
I was finally able to fix this by also applying an
elevation
to the style, which removes the unwanted drop shadowThank you 😃