Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

通过发通知方式通知另外一个Activity显示浮窗,设置的偏移量失效 #234

Open
simplepeng opened this issue Jul 24, 2023 · 0 comments

Comments

@simplepeng
Copy link

        val marginBottom = if (EasyFloat.isShow(relaxMusicFloatTag)) {
            -dp2px(170f).toInt()
        } else {
            -dp2px(80f).toInt()
        }
        LogHelper.debug("marginBottom = $marginBottom")
        easyFloat.setGravity(Gravity.END or Gravity.BOTTOM, 0, marginBottom)
        easyFloat.setSidePattern(SidePattern.RESULT_HORIZONTAL)
        easyFloat.setTag(vipDiscountFloatTag)
        easyFloat.show()

marginBottom = -230

就上面的代码,正式点击按钮显示是正常的,跳转到其他Activity去,发送通知给这个Activity显示浮窗,然后就没有偏移量,
好像是当前Activity处于后台就有个这个问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant