SlidingPaneLayout setCoveredFadeColor()和setSliderFadeColor() [英] SlidingPaneLayout setCoveredFadeColor () and setSliderFadeColor()

查看:502
本文介绍了SlidingPaneLayout setCoveredFadeColor()和setSliderFadeColor()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用了 SlidingPaneLayout 并要设置灰色渐变色在左窗格中当滑块右侧窗格中打开,在左侧窗格中的一个透明的渐变色当右边的窗格中关闭,左窗格中完全可见。结果
我知道这是我的其中滑块左侧窗格中始终保持消失在横向模式 SlidingPaneLayout ,但默认实现我现在面临的问题的默认行为,并采取没有点击事件即使正确滑盖关闭。结果
我实现了 SlidingPaneLayout.SimplePanelSlideListener onPanelOpened() onPanelClosed管理褪色的颜色( )
但我挑剔,我应该使用此确定哪些功能... setCoveredFadeColor() setSliderFadeColor()?结果
什么是这两种功能之间的确切区别?

I'm using the SlidingPaneLayout and want to set gray fade color on left pane when the slider right pane is open and a transparent fade color on the left pane when the right pane is closed and left pane is fully visible.
I know this is the default behaviour of the SlidingPaneLayout , but with default implementation I'm facing issues in the landscape mode wherein my slider left pane always remains faded and takes no click events even if right slide is closed.
I implemented the SlidingPaneLayout.SimplePanelSlideListener and managed the fade colors in onPanelOpened() and onPanelClosed() But I'm nit sure which function should I use for this... setCoveredFadeColor() or setSliderFadeColor()?
What is the exact difference between these 2 functions?

任何帮助很多AP preciated。谢谢!

Any help is much appreciated. Thanks!

推荐答案

从的文档

<一个href=\"http://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.html#setSliderFadeColor%28int%29\"相对=nofollow> setSliderFadeColor(INT颜色) 设置用来淡化由滑动窗户掉了覆盖面板的颜色时,面板将在成为全面覆盖关闭状态。

setSliderFadeColor(int color) Set the color used to fade the pane covered by the sliding pane out when the pane will become fully covered in the closed state.

<一个href=\"http://developer.android.com/reference/android/support/v4/widget/SlidingPaneLayout.html#setCoveredFadeColor%28int%29\"相对=nofollow> setCoveredFadeColor(INT颜色) 设置用来淡化滑动窗户掉了,当滑动大部分屏幕外的方式的颜色。

setCoveredFadeColor(int color) Set the color used to fade the sliding pane out when it is slid most of the way offscreen.

在我的经验中,我发现,被覆盖的需求面板至少320dp宽这两个颜色褪色的工作。

In my experience, I've found that the panel that gets covered needs to be at least 320dp wide for these two fade colours to work.

这篇关于SlidingPaneLayout setCoveredFadeColor()和setSliderFadeColor()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆