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

Edittext导致背景颜色失效,变成透明(8.0及以下才会出现) #486

Open
Comate716 opened this issue Feb 23, 2023 · 3 comments

Comments

@Comate716
Copy link

  • 系统版本(必须)/ System version (required):Android8.0及以下 10.0暂时正常
  • 库版本(必须)/ Library version (required):3.2.0
  • 问题代码/截图(可选)/ Problem code or screenshot (optional):
  • 报错信息(可选)/ Error reporting information (optional):
    正常时:
    image
    Edittext抢占焦点时:
    0e3df93ab4c24fb8044d11fccf0a5d3

问题描述/重现步骤请写在这里

我的BasePopup设置了白色背景(xml根布局)
如果BasePopup内没有Edittext 则背景颜色正常
如果BasePopup内含有Edittext,由于Edittext抢占了焦点,会导致BasePopup背景颜色失效 变成透明色
BasePopup所在的acitvity:
android:windowSoftInputMode="adjustPan"
basePopup.setKeyboardAdaptionMode(FLAG_KEYBOARD_IGNORE_OVER);
以上是与此现象相关的代码

@razerdp
Copy link
Owner

razerdp commented Mar 2, 2023

我尝试了一下,好像无法复现诶。。。有工程打包拖到评论区吗

@Comate716
Copy link
Author

@razerdp 见鬼了 我新建了一个demo项目 同样的代码 甚至
compileSdkVersion 29
buildToolsVersion '29.0.3'
minSdkVersion 21
targetSdkVersion 29
这几个都保持了一致 结果demo显示正常 。。
原项目无论怎么改 还是会导致那个异常显示现象 我现在的简略做法就是判断如果在Android8.0以下 就把basepopup的背景设置成纯白色 这样至少不会像透明色那么奇怪了 后续我再研究一下吧~

@razerdp
Copy link
Owner

razerdp commented Mar 3, 2023

11,蹲个结果~

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

2 participants