Kennyc1012 / BottomSheetMenu

BottomSheetMenu style dialogs for Android
Apache License 2.0
887 stars 99 forks source link

Unable to set background for custom view #53

Closed rpattabi closed 5 years ago

rpattabi commented 6 years ago

I am unable to get dark background for my custom view, though the app theme is dark. I've also tried setting background for the view group of the layout.

I'm inflating my layout like this:

binding = DataBindingUtil.inflate(
          getLayoutInflater(), R.layout.my_layout, activityBinding.activityRoot, false)

binding.getRoot() is given to bottom sheet builder.

I have tried setting the theme and background to my_layout

    <android.support.constraint.ConstraintLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:paddingTop="16dp"
        app:theme="@style/MyDarkTheme"
        android:background="?attr/colorBottomSheetBackground"
    >

Also tried setting bottom_sheet_bg_color as part of MyDarkTheme

What am I missing? I'm using 2.4.1

rpattabi commented 6 years ago

I found that instead of setting android:background, if I set android:backgroundTint, it is working. However, background tint is supported from lollipop.

Kennyc1012 commented 5 years ago

No longer relevant.