material-components / material-components-android

Modular and customizable Material Design UI components for Android
Apache License 2.0
16.38k stars 3.07k forks source link

[SideSheet] Make SideSheetBehavior non-final #3092

Closed manabu-nakamura closed 1 year ago

manabu-nakamura commented 1 year ago

Is your feature request related to a problem? Please describe. I can't create a class that extends SideSheetBehavior because it is a final class. I want to override getScrimOpacity() method to create a modal side sheet without using SideSheetDialog. Sometimes I create a modal bottom sheet without using BottomSheetDialog. https://github.com/material-components/material-components-android/blob/master/lib/java/com/google/android/material/sidesheet/SideSheetBehavior.java#L66 https://github.com/material-components/material-components-android/blob/master/lib/java/com/google/android/material/bottomsheet/BottomSheetBehavior.java#L87

Describe the solution you'd like Make SideSheetBehavior non-final.

drchen commented 1 year ago

@afohrman can you take a look?

I think the request makes sense and it's also aligned with BottomSheetBehavior.

afohrman commented 1 year ago

Thanks for calling this out! Submitted https://github.com/material-components/material-components-android/commit/b384b9b5350e4b0f6463fe4664f1254eb3199cd2 to open up SideSheetBehavior.