Closed ifmvo closed 5 years ago
问题在于 GestureCover 里面有两个变量 mWidth, mHeight 只有在 onCoverAttachedToWindow 中获取。 我觉得应在切换横竖屏的时候通知到 GestureCover 重新获取 mWidth, mHeight
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;
@ifmvo 好的,谢谢提醒。
意思就是竖屏时调节亮度和声音各占屏幕宽度的1/2,横屏时调节亮度就只占屏幕左边差不多1/4了