mkko / DrawerView

A drop-in view, to be used as a drawer anywhere in your app
MIT License
374 stars 57 forks source link

How to disable top darkening #17

Closed lazaro10 closed 4 years ago

lazaro10 commented 4 years ago

Hello, first thanks so much for creating this framework, it's been very useful in my project.

I searched the documentation and code, but I didn't find it.

How do I turn off this animation that makes the top part dark when I scroll the drawer to the top of my screen? it's possible?

mkko commented 4 years ago

Hi and thank you!

Do you mean that you'd like to turn off the overlay (the dark layer)? Currently it's not possible, but it's a bit overdue to add this customization. Or do you simply want to turn off the animation with it?

lazaro10 commented 4 years ago

Hello Mkko, Thanks for the reply.

I just want to disable the overlay.

mkko commented 4 years ago

@lazaro10 I added a property to address your issue:

var overlayVisibilityBehavior: OverlayVisibilityBehavior
    public enum OverlayVisibilityBehavior {
        /// Show the overlay only when at the topmost position.
        case topmostPosition
        /// Show the overlay when open, either fully or partially.
        case whenOpen
        /// Don't show overlay
        case disabled
    }