jiajunhui / PlayerBase

The basic library of Android player will process complex business components. The access is simple。Android播放器基础库,专注于播放视图组件的高复用性和组件间的低耦合,轻松处理复杂业务。
Apache License 2.0
2.92k stars 437 forks source link

竖屏时调节声音和亮度手势宽度各占一半,横屏时调节声音的宽度大于调节亮度的宽度 #63

Closed ifmvo closed 5 years ago

ifmvo commented 5 years ago

意思就是竖屏时调节亮度和声音各占屏幕宽度的1/2,横屏时调节亮度就只占屏幕左边差不多1/4了

ifmvo commented 5 years ago

问题在于 GestureCover 里面有两个变量 mWidth, mHeight 只有在 onCoverAttachedToWindow 中获取。 我觉得应在切换横竖屏的时候通知到 GestureCover 重新获取 mWidth, mHeight

ifmvo commented 5 years ago

case DataInter.Key.KEY_IS_LANDSCAPE: if ((boolean) value) { mWidth = Kits.Dimens.getDisplayWidth(getContext()); mHeight = Kits.Dimens.getDisplayHeight(getContext()); } else { mWidth = Kits.Dimens.getDisplayWidth(getContext()); mHeight = mWidth * 9 / 16; } Log.e("ifmvo", "KEY_IS_LANDSCAPE:mWidth:" + mWidth + ",mHeight:" + mHeight); break;

jiajunhui commented 5 years ago

@ifmvo 好的,谢谢提醒。