SlidingPaneLayout setCoveredFadeColor () and setSliderFadeColor ()

I use SlidingPaneLayoutand want to set the gray color of the fade in the left panel when the right panel of the slider is open, and the transparent color of the fade in the left panel when the right panel is closed and the left panel is fully visible.
I know this is the default behavior for SlidingPaneLayout, but with a default implementation. I encounter problems in landscape mode, while my slider panel always remains pale and does not accept any click events, even if the right slide is closed.
I implemented SlidingPaneLayout.SimplePanelSlideListenerand controlled the fade colors in onPanelOpened()and. onPanelClosed() But I'm sure what function should I use for this ... setCoveredFadeColor()or setSliderFadeColor()?
What is the difference between these two functions?

Any help is greatly appreciated. Thank!

+3
source share
1 answer

From docs :

setSliderFadeColor(int color) Set the color used to fade the panel covered with the sliding panel when the panel is fully closed when closed.

setCoveredFadeColor(int color) Set the color used to fade the slide panel when it slides mostly off-screen.

In my experience, I found that the panel that is being covered should be at least 320dp for these two attenuation colors.

+3
source

Source: https://habr.com/ru/post/1569203/


All Articles