EasyFloat icon indicating copy to clipboard operation
EasyFloat copied to clipboard

BUG:android 12上 横屏后拖动会有问题。

Open puyang1017 opened this issue 2 years ago • 5 comments

android12横屏下屏幕测量的宽高还是按竖屏参数返回的,在android12 以下是根据横竖屏返回正确的参数没有问题。

puyang1017 avatar Mar 16 '22 09:03 puyang1017

我自己设置了一个参数来强制改变

puyang1017 avatar Mar 16 '22 09:03 puyang1017

if (Build.VERSION.SDK_INT >= 31) { if (config.forceLandscape) { parentHeight = DisplayUtils.getScreenWidth(context) parentWidth = config.displayHeight.getDisplayRealHeight(context) } else { parentWidth = DisplayUtils.getScreenWidth(context) parentHeight = config.displayHeight.getDisplayRealHeight(context) } } else { parentWidth = DisplayUtils.getScreenWidth(context) parentHeight = config.displayHeight.getDisplayRealHeight(context) }

puyang1017 avatar Mar 16 '22 09:03 puyang1017

if (Build.VERSION.SDK_INT >= 31) { if (config.forceLandscape) { parentHeight = DisplayUtils.getScreenWidth(context) parentWidth = config.displayHeight.getDisplayRealHeight(context) } else { parentWidth = DisplayUtils.getScreenWidth(context) parentHeight = config.displayHeight.getDisplayRealHeight(context) } } else { parentWidth = DisplayUtils.getScreenWidth(context) parentHeight = config.displayHeight.getDisplayRealHeight(context) }

解决了

jxoday avatar Jun 23 '22 07:06 jxoday

可以参考哈我们这边改的库:https://github.com/puyang1017/EasyFloat/commits/master, 多调用哈这个setForceLandscape(isLandscape)

woshiluoyong avatar Jan 19 '23 07:01 woshiluoyong

可以参考哈我们这边改的库:https://github.com/puyang1017/EasyFloat/commits/master, 多调用哈这个setForceLandscape(isLandscape)

可以把2.0.4最新更改同步到你的项目吗?

Andrewmika avatar Dec 12 '23 14:12 Andrewmika