-
Notifications
You must be signed in to change notification settings - Fork 114
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
android.R.id.content 为null #11
Comments
你试试直接用 |
试过了,view.getRootView() 跟注释掉这段一样的效果 |
尝试过安装一下demo看会报错吗? |
没有报错,所以感觉传进去的自定义view有关系,我的是悬浮窗的自定义 view |
那你把这几句都注释了试试!
|
注释掉可以,就是显示位置有点偏移 |
因该是向下偏移了个状态栏的高度吧? |
跟上一个问题的显示问题差不多 |
在这里你计算一下状态栏高度,然后减去这个高度因该就可以了 |
|
好,我搞搞 |
恩,或则通过 |
现在就是通过setOffsetX 和setOffsetY设置,来达到效果的 |
恩,这里看来也得判断一下,没有考虑到悬浮窗的问题。这里的代码就是为了解决上一个问题 |
xujiaji
added a commit
that referenced
this issue
Apr 1, 2019
xujiaji
added a commit
that referenced
this issue
Apr 7, 2019
已更新,v1.1.7已修复 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
view.getRootView().findViewById(android.R.id.content) 到这步,获取为null,百度,google没找到,请问这个是什么原因?
The text was updated successfully, but these errors were encountered: