We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
updateViewPosition函数我看可以控制移动范围
The text was updated successfully, but these errors were encountered:
目前只能先反射获取mStatusBarHeight,mScreenHeight来控制移动区域,后面有遇到这个问题的同学可以先这样解决,希望作者出个函数来解决
init { this.post { // 设置初始位置 x = (ScreenUtils.getScreenWidth() - width - ConvertUtils.dp2px(5f)).toFloat() y = (ScreenUtils.getScreenHeight() - height - BarUtils.getStatusBarHeight() - BarUtils.getActionBarHeight() - ConvertUtils.dp2px( 50f )).toFloat() val cls = FloatingMagnetView::class.java val f2 = cls.getDeclaredField("mStatusBarHeight") f2.isAccessible = true val mStatusBarHeight = f2.getInt(this) f2.setInt(this, mStatusBarHeight + ConvertUtils.dp2px(50f)) } } override fun updateSize() { super.updateSize() val cls = FloatingMagnetView::class.java val f = cls.getDeclaredField("mScreenHeight") f.isAccessible = true val mScreenHeight = f.getInt(this) f.setInt(this, mScreenHeight - ConvertUtils.dp2px(54f)) }
Sorry, something went wrong.
No branches or pull requests
updateViewPosition函数我看可以控制移动范围
The text was updated successfully, but these errors were encountered: